refactoring, documentation-enhancement

This commit is contained in:
tastytea 2018-04-04 04:38:04 +02:00
parent c944abccb5
commit a6f0b20bc5
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
3 changed files with 14 additions and 4 deletions

View File

@ -116,6 +116,9 @@ public:
class Link
{
public:
/*!
* @param link_header The content of the `Link` header
*/
explicit Link(const string &link_header);
/*!
@ -273,6 +276,7 @@ public:
*/
const std::vector<string> get_vector(const string &key) const;
private:
Json::Value _tree;
bool _valid;
};

View File

@ -30,7 +30,7 @@ Notification::Notification()
const Easy::Account Notification::account() const
{
const Json::Value node = _tree["account"];
const Json::Value node = get("account");
if (node.isObject())
{
return Easy::Account(node.toStyledString());

View File

@ -80,6 +80,9 @@ public:
class http
{
public:
/*!
* @brief HTTP methods
*/
enum class method
{
GET,
@ -113,11 +116,11 @@ public:
const curlpp::Forms &formdata,
string &answer);
/*!
* @brief Get all headers in a string
*/
const void get_headers(string &headers) const;
const size_t callback(char* data, size_t size, size_t nmemb,
string *oss);
/*!
* @brief Aborts the stream. Use only with streams.
*
@ -134,6 +137,9 @@ public:
const string _access_token;
string _headers;
bool _abort_stream;
const size_t callback(char* data, size_t size, size_t nmemb,
string *oss);
};
/*!