code format
This commit is contained in:
@@ -9,14 +9,14 @@ Show::Show() {
|
||||
}
|
||||
|
||||
void Show::screenName(const std::string& _screenName) {
|
||||
if(bodyParam_.count("user_id") > 0){
|
||||
if (bodyParam_.count("user_id") > 0) {
|
||||
bodyParam_.erase("user_id");
|
||||
}
|
||||
bodyParam_.insert_or_assign("screen_name", _screenName);
|
||||
}
|
||||
|
||||
void Show::id(const std::string& _id) {
|
||||
if(bodyParam_.count("screen_name") > 0){
|
||||
if (bodyParam_.count("screen_name") > 0) {
|
||||
bodyParam_.erase("screen_name");
|
||||
}
|
||||
bodyParam_.insert_or_assign("id", _id);
|
||||
@@ -31,4 +31,4 @@ CocoaTweet::API::Model::User Show::process(
|
||||
return user;
|
||||
}
|
||||
|
||||
} // namespace CocoaTweet::API::Statuses
|
||||
} // namespace CocoaTweet::API::Users
|
||||
|
||||
@@ -23,7 +23,8 @@ public:
|
||||
void screenName(const std::string& _screenName);
|
||||
|
||||
/// @brief process request for endpoint
|
||||
/// @param[in] std::weak_ptr<CocoaTweet::Authentication::AuthenticatorBase> _oauth : pointer to oauth object
|
||||
/// @param[in] std::weak_ptr<CocoaTweet::Authentication::AuthenticatorBase> _oauth : pointer
|
||||
/// to oauth object
|
||||
/// @param[out] CocoaTweet::API::Model::User : request result
|
||||
CocoaTweet::API::Model::User process(
|
||||
std::weak_ptr<CocoaTweet::Authentication::AuthenticatorBase> _oauth);
|
||||
@@ -31,6 +32,6 @@ public:
|
||||
private:
|
||||
std::string status_;
|
||||
};
|
||||
} // namespace CocoaTweet::API::Statuses
|
||||
} // namespace CocoaTweet::API::Users
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include <cocoatweet/api/user/user.h>
|
||||
#include <cocoatweet/api/user/show.h>
|
||||
|
||||
namespace CocoaTweet::API::Users{
|
||||
User::User(std::shared_ptr<CocoaTweet::Authentication::AuthenticatorBase> _oauth) {
|
||||
namespace CocoaTweet::API::Users {
|
||||
User::User(std::shared_ptr<CocoaTweet::Authentication::AuthenticatorBase> _oauth) {
|
||||
oauth_ = _oauth;
|
||||
}
|
||||
|
||||
CocoaTweet::API::Model::User User::show(const std::string& _screenName)const{
|
||||
CocoaTweet::API::Users::Show show;
|
||||
show.screenName(_screenName);
|
||||
return show.process(oauth_);
|
||||
}
|
||||
}
|
||||
CocoaTweet::API::Model::User User::show(const std::string& _screenName) const {
|
||||
CocoaTweet::API::Users::Show show;
|
||||
show.screenName(_screenName);
|
||||
return show.process(oauth_);
|
||||
}
|
||||
} // namespace CocoaTweet::API::Users
|
||||
@@ -13,14 +13,14 @@ class User : public groupInterface {
|
||||
public:
|
||||
/// @brief primary constructor
|
||||
User() = default;
|
||||
|
||||
|
||||
/// @brief constructor which finally should to be called.
|
||||
/// @param[in] std::shared_ptr<CocoaTweet::Authentication::AuthenticatorBase> : pointer to OAuth object
|
||||
/// @param[in] std::shared_ptr<CocoaTweet::Authentication::AuthenticatorBase> : pointer to
|
||||
/// OAuth object
|
||||
User(std::shared_ptr<CocoaTweet::Authentication::AuthenticatorBase> _oauth);
|
||||
|
||||
CocoaTweet::API::Model::User show(const std::string& _screenName) const;
|
||||
|
||||
};
|
||||
} // namespace CocoaTweet::API::Statuses
|
||||
} // namespace CocoaTweet::API::Users
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user