From a3f2e940341e2a6759bbf5a1b74ef36a3f4080e2 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 13 Apr 2019 02:27:21 +0200 Subject: [PATCH] Bettered documentation. --- src/mastodon-cpp.hpp | 52 +++++--------------------------------------- src/types.hpp | 2 +- 2 files changed, 6 insertions(+), 48 deletions(-) diff --git a/src/mastodon-cpp.hpp b/src/mastodon-cpp.hpp index 9410f9c..2fd9ee1 100644 --- a/src/mastodon-cpp.hpp +++ b/src/mastodon-cpp.hpp @@ -101,10 +101,7 @@ namespace Mastodon * @param path The API call as string. * @param formdata The form data for PATCH and POST requests. * - * @return @ref error "Error code". If the URL has permanently - * changed, 13 is returned and the answer is set to the new URL. - * - * @since before 0.11.0 + * @since 0.100.0 */ return_call request(const http_method &meth, const string &path, @@ -384,10 +381,7 @@ namespace Mastodon * @param url Returned, used to generate code for * register_app2 * - * @return @ref error "Error code". If the URL has permanently changed, - * 13 is returned and url is set to the new URL. - * - * @since before 0.11.0 + * @since before 0.100.0 */ return_call register_app1(const string &client_name, const string &redirect_uri, @@ -409,9 +403,7 @@ namespace Mastodon * @param code The code generated by the website * @param access_token Returned * - * @return @ref error "Error code". - * - * @since before 0.11.0 + * @since before 0.100.0 */ return_call register_app2(const string &client_id, const string &client_secret, @@ -487,8 +479,6 @@ namespace Mastodon * * @param call A call defined in Mastodon::API::v1 * - * @return return_call - * * @since 0.100.0 */ const return_call get(const Mastodon::API::v1 &call); @@ -500,7 +490,7 @@ namespace Mastodon * @param parameters A Mastodon::parametermap containing * parameters * - * @return return_call + * @since 0.100.0 */ const return_call get(const Mastodon::API::v1 &call, const parameters ¶meters); @@ -508,13 +498,11 @@ namespace Mastodon /*! * @brief Make a GET request which requires parameters. * - * @since 0.100.0 - * * @param call A call defined in Mastodon::API::v2 * @param parameters A Mastodon::parametermap containing * parameters * - * @return return_call + * @since 0.100.0 */ const return_call get(const Mastodon::API::v2 &call, const parameters ¶meters); @@ -524,8 +512,6 @@ namespace Mastodon * * @param call String in the form `/api/v1/example` * - * @return return_call - * * @since 0.100.0 */ const return_call get(const string &call); @@ -539,14 +525,6 @@ namespace Mastodon * @param ptr Pointer to the http object. Can be used to call * ptr->cancel_stream() * - * @return @ref error "Errors" are reported in this format: - * `{"error_code":uint8_t,"http_error":uint16_t}`. `http_error` is - * optional. - * - * @return @ref error "Errors" are reported in this format: - * `{"error_code":uint8_t,"http_error":uint16_t}`. `http_error` is - * optional. - * * @since 0.100.0 */ void get_stream(const Mastodon::API::v1 &call, @@ -561,10 +539,6 @@ namespace Mastodon * @param ptr Pointer to the http object. Can be used to call * ptr->cancel_stream() * - * @return @ref error "Errors" are reported in this format: - * `{"error_code":uint8_t,"http_error":uint16_t}`. `http_error` is - * optional. - * * @since 0.100.0 */ void get_stream(const Mastodon::API::v1 &call, @@ -593,8 +567,6 @@ namespace Mastodon * @param parameters A Mastodon::parametermap containing * parameters * - * @return @ref error "Error code". - * * @since 0.100.0 */ return_call patch(const Mastodon::API::v1 &call, @@ -605,8 +577,6 @@ namespace Mastodon * * @param call A call defined in Mastodon::API::v1 * - * @return @ref error "Error code". - * * @since 0.100.0 */ return_call post(const Mastodon::API::v1 &call); @@ -620,8 +590,6 @@ namespace Mastodon * @param parameters A Mastodon::parametermap containing * parameters * - * @return @ref error "Error code". - * * @since 0.100.0 */ return_call post(const Mastodon::API::v1 &call, @@ -636,8 +604,6 @@ namespace Mastodon * @param parameters A Mastodon::parametermap containing * parameters * - * @return @ref error "Error code". - * * @since 0.100.0 */ return_call post(const string &call, @@ -650,8 +616,6 @@ namespace Mastodon * @param parameters A Mastodon::parametermap containing * parameters * - * @return @ref error "Error code". - * * @since 0.100.0 */ return_call put(const Mastodon::API::v1 &call, @@ -664,8 +628,6 @@ namespace Mastodon * @param parameters A Mastodon::parametermap containing * parameters * - * @return @ref error "Error code". - * * @since 0.100.0 */ return_call put(const string &call, const parameters ¶meters); @@ -677,8 +639,6 @@ namespace Mastodon * @param parameters A Mastodon::parametermap containing * parameters * - * @return @ref error "Error code". - * * @since 0.100.0 */ return_call del(const Mastodon::API::v1 &call, @@ -691,8 +651,6 @@ namespace Mastodon * @param parameters A Mastodon::parametermap containing * parameters * - * @return @ref error "Error code". - * * @since 0.100.0 */ return_call del(const string &call, const parameters ¶meters); diff --git a/src/types.hpp b/src/types.hpp index 0a6f598..d134230 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -82,7 +82,7 @@ namespace Mastodon /*! * @brief HTTP methods. * - * @since before 0.100.0 + * @since 0.100.0 */ enum class http_method {