Change example in readme.
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
1831bb1ab2
commit
1d2c088af9
10
README.adoc
10
README.adoc
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user