From 01996113de9b5a7f98c50a893a948e02e336c7ac Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 9 Feb 2018 22:37:57 +0100 Subject: [PATCH] updated documentation --- src/mastodon-cpp.hpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/mastodon-cpp.hpp b/src/mastodon-cpp.hpp index 1a43423..5e70916 100644 --- a/src/mastodon-cpp.hpp +++ b/src/mastodon-cpp.hpp @@ -169,6 +169,20 @@ public: */ const std::string urlencode(const std::string &str) const; + /*! + * @brief Register application, step 1/2 + * + * @param instance + * @param client_name The name of the application + * @param redirect_uri urn:ietf:wg:oauth:2.0:oob for none + * @param scopes Scopes (read, write, follow, space separated) + * @param website The website of the application + * @param client_id Returned + * @param client_secret Returned + * @param url Returned, used to generate code for register_app2 + * + * @return @ref error "Error code". + */ const std::uint16_t register_app1(const std::string &instance, const std::string &client_name, const std::string &redirect_uri, @@ -177,6 +191,19 @@ public: std::string &client_id, std::string &client_secret, std::string &url); + + /*! + * @brief Register application, step 2/2 + * + * @param instance + * @param client_id + * @param client_secret + * @param redirect_uri urn:ietf:wg:oauth:2.0:oob for none + * @param code The code generated by the website + * @param access_token Returned + * + * @return @ref error "Error code". + */ const std::uint16_t register_app2(const std::string &instance, const std::string &client_id, const std::string &client_secret, @@ -382,8 +409,6 @@ public: * * @param call A call defined in Mastodon::API::v1 * @param argument The non-optional argument - * @param answer The answer from the server. Usually JSON. On error an - * empty string. * * @return @ref error "Error code". */