From 1ac1bda6195fb3344c605192023350df6d12f0b4 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 6 Jan 2020 13:29:38 +0100 Subject: [PATCH] Add parametermap. --- include/curl_wrapper.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 #include #include +#include +#include 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{"Yes", "No", "Maybe"}} + * }; + * @endcode + * + * @since 0.1.0 + */ +using parametermap = map>>; + /*! * @brief Handles the details of network connections. *