From 1d2c088af9d3802928e807da31e8d80cb1d55957 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 10 Jan 2020 19:34:50 +0100 Subject: [PATCH] Change example in readme. --- README.adoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 37a157b..5c55858 100644 --- a/README.adoc +++ b/README.adoc @@ -55,7 +55,15 @@ int main() { mastodonpp::Instance instance{"example.com", {}}; mastodonpp::Connection connection{instance}; - auto answer{connection.get(mastodonpp::API::v1::instance)}; + + const mastodonpp::parametermap parameters + { + {"status", "How is the wheather?"}, + {"poll[options]", vector{"Nice", "not nice"}}, + {"poll[expires_in]", "86400"} + }; + auto answer{connection.post(mastodonpp::API::v1::statuses, parameters)}; + if (answer) { std::cout << answer << std::endl;