refactoring, documentation-enhancement
This commit is contained in:
parent
c944abccb5
commit
a6f0b20bc5
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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());
|
||||||
|
|
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Reference in New Issue
Block a user