Add parametermap.
This commit is contained in:
parent
a1a6997619
commit
1ac1bda619
|
@ -21,14 +21,20 @@
|
|||
|
||||
#include "curl/curl.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
namespace mastodonpp
|
||||
{
|
||||
|
||||
using std::map;
|
||||
using std::string;
|
||||
using std::string_view;
|
||||
using std::variant;
|
||||
using std::vector;
|
||||
|
||||
/*!
|
||||
* @brief The HTTP method.
|
||||
|
@ -44,6 +50,22 @@ enum class http_method
|
|||
DELETE
|
||||
};
|
||||
|
||||
/*!
|
||||
* @brief std::map of parameters for API calls.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* parametermap parameters
|
||||
* {
|
||||
* {"id", "12"},
|
||||
* {"poll[options]", vector<string>{"Yes", "No", "Maybe"}}
|
||||
* };
|
||||
* @endcode
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
using parametermap = map<string, variant<string, vector<string>>>;
|
||||
|
||||
/*!
|
||||
* @brief Handles the details of network connections.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user