This repository has been archived on 2020-05-10. You can view files and clone it, but cannot push or open issues or pull requests.
2018-01-06 21:33:52 +01:00
|
|
|
/* This file is part of mastodon-cpp.
|
|
|
|
*/
|
|
|
|
|
2018-01-09 22:12:11 +01:00
|
|
|
#include <iostream>
|
2018-01-13 00:34:16 +01:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
2018-01-06 21:33:52 +01:00
|
|
|
#include "../mastodon-cpp.hpp"
|
|
|
|
|
2018-01-12 20:49:15 +01:00
|
|
|
using Mastodon::API;
|
|
|
|
|
2018-01-06 21:33:52 +01:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2018-01-09 22:12:11 +01:00
|
|
|
if (argc < 3)
|
|
|
|
{
|
|
|
|
std::cerr << "usage: " << argv[0] << " <instance> <access token>\n";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
Mastodon::API masto(argv[1], argv[2]);
|
|
|
|
|
2018-01-13 00:34:16 +01:00
|
|
|
std::vector<std::string> parameters =
|
|
|
|
{
|
|
|
|
"limit=2",
|
|
|
|
"only_media=1"
|
|
|
|
};
|
|
|
|
std::cout <<
|
|
|
|
masto.get(API::v1::accounts_id_statuses, "44897", parameters) <<
|
|
|
|
'\n';
|
2018-01-06 21:33:52 +01:00
|
|
|
}
|