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.
mastodon-cpp/src/example/example.cpp

21 lines
401 B
C++
Raw Normal View History

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-06 21:33:52 +01:00
#include "../mastodon-cpp.hpp"
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]);
std::cout << masto.get(API::v1::timelines_tag_hashtag, "FOSS") << '\n';
2018-01-06 21:33:52 +01:00
}