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

View File

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

View File

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