diff options
author | tastytea | 2020-01-06 13:29:38 +0100 |
---|---|---|
committer | tastytea | 2020-01-06 13:29:38 +0100 |
commit | 1ac1bda6195fb3344c605192023350df6d12f0b4 (patch) | |
tree | 1db7b5b2b284c26a6ac1eb8351e39d05054328e5 /include | |
parent | a1a69976192b6ba7c3f8b86377795e51128cba24 (diff) | |
download | mastodonpp-1ac1bda6195fb3344c605192023350df6d12f0b4.tar mastodonpp-1ac1bda6195fb3344c605192023350df6d12f0b4.tar.gz mastodonpp-1ac1bda6195fb3344c605192023350df6d12f0b4.zip |
Add parametermap.
Diffstat (limited to 'include')
-rw-r--r-- | include/curl_wrapper.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/curl_wrapper.hpp b/include/curl_wrapper.hpp index 90e010a..b11999b 100644 --- a/include/curl_wrapper.hpp +++ b/include/curl_wrapper.hpp @@ -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. @@ -45,6 +51,22 @@ enum class http_method }; /*! + * @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. * * You don't need to use this. |