#include <iostream>
#include <vector>
#include <string>
#include <cstdint>
#ifdef MASTODON_CPP
#include "mastodon-cpp.hpp"
#else
#include <mastodon-cpp/mastodon-cpp.hpp>
#endif
using std::cout;
int main(int argc, char *argv[])
{
if (argc < 3)
{
std::cerr << "usage: " << argv[0] << " <instance> <access token>\n";
return 1;
}
masto.
set_proxy(
"socks5h://[fd12::1a]:1080/");
masto.
set_proxy(
"https://localhost:3128",
"user5:supersecurepassword");
std::string answer;
std::uint16_t ret;
ret = masto.
get(API::v1::accounts_verify_credentials, answer);
cout << "Return code: " << ret << '\n';
std::cout << answer << '\n';
return 0;
}