From 9874e76de248835d0b3cc2d20ee2f151a4b553bb Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 3 Jan 2020 13:05:00 +0100 Subject: [PATCH] Improve documentation. --- include/instance.hpp | 7 +++++-- include/request.hpp | 12 ++++++++++++ include/return_types.hpp | 8 ++++---- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/include/instance.hpp b/include/instance.hpp index c7be1cd..9afc423 100644 --- a/include/instance.hpp +++ b/include/instance.hpp @@ -24,14 +24,17 @@ namespace mastodonpp using std::string; +/*! + * @brief Holds the hostname and access token of an instance. + * + * @since 0.1.0 + */ class Instance { public: /*! * @brief Construct a new Instance object. * - * Holds the hostname and access token of the instance. - * * @param instance The hostname of the instance. * @param access_token Your access token. * diff --git a/include/request.hpp b/include/request.hpp index 97aa2ec..f1bc6ec 100644 --- a/include/request.hpp +++ b/include/request.hpp @@ -22,9 +22,21 @@ namespace mastodonpp { +/*! + * @brief Used to make a request to the Mastodon API. + * + * @since 0.1.0 + */ class Request { public: + /*! + * @brief Construct a new Request object. + * + * @param instance An Instance with the access data. + * + * @since 0.1.0 + */ explicit Request(Instance &instance); private: diff --git a/include/return_types.hpp b/include/return_types.hpp index 7d09519..28cdca5 100644 --- a/include/return_types.hpp +++ b/include/return_types.hpp @@ -30,7 +30,7 @@ using std::string; using std::string_view; /*! - * @brief Return type for API calls. + * @brief Return type for Request%s. * * @since 0.1.0 * @@ -67,21 +67,21 @@ struct answer string body; /*! - * @brief Returns true if answer::error_code is 0, false otherwise. + * @brief Returns true if #error_code is 0, false otherwise. * * @since 0.1.0 */ explicit operator bool() const; /*! - * @brief Returns answer::body as std::string_view. + * @brief Returns #body as `std::string_view`. * * @since 0.1.0 */ explicit operator string_view() const; /*! - * @brief Returns answer::body as std::ostream. + * @brief Returns #body as `std::ostream`. * * @since 0.1.0 */