Change example in readme.
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
tastytea 2020-01-10 19:34:50 +01:00
parent 1831bb1ab2
commit 1d2c088af9
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -55,7 +55,15 @@ int main()
{ {
mastodonpp::Instance instance{"example.com", {}}; mastodonpp::Instance instance{"example.com", {}};
mastodonpp::Connection connection{instance}; mastodonpp::Connection connection{instance};
auto answer{connection.get(mastodonpp::API::v1::instance)};
const mastodonpp::parametermap parameters
{
{"status", "How is the wheather?"},
{"poll[options]", vector<string_view>{"Nice", "not nice"}},
{"poll[expires_in]", "86400"}
};
auto answer{connection.post(mastodonpp::API::v1::statuses, parameters)};
if (answer) if (answer)
{ {
std::cout << answer << std::endl; std::cout << answer << std::endl;