Add Request::get() (without real function for now).
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tastytea 2020-01-04 11:38:58 +01:00
parent e6690c85b4
commit 4acab9da5c
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 20 additions and 0 deletions

View File

@ -17,11 +17,17 @@
#ifndef MASTODONPP_REQUEST_HPP
#define MASTODONPP_REQUEST_HPP
#include "api.hpp"
#include "instance.hpp"
#include "return_types.hpp"
#include <string>
namespace mastodonpp
{
using std::string;
/*!
* @brief Used to make a request to the Mastodon API.
*
@ -39,6 +45,13 @@ public:
*/
explicit Request(Instance &instance);
/*!
* @brief Make a HTTP GET call.
*
* @since 0.1.0
*/
answer_type get(API::endpoint_type endpoint) const;
private:
Instance &_instance;
};

View File

@ -23,4 +23,11 @@ Request::Request(Instance &instance)
: _instance{instance}
{}
answer_type Request::get(API::endpoint_type endpoint) const
{
answer_type answer;
answer.body = API{endpoint}.to_string();
return answer;
}
} // namespace mastodonpp