Using the library
Include mastodonpp.hpp, which then includes all other headers.
#include <mastodonpp/mastodonpp.hpp>
Use it in your CMake project like this:
target_link_libraries(MyProject mastodonpp::mastodonpp)
Or compile your code with g++ $(pkg-config --cflags --libs mastodonpp)
.
Example
#include <mastodonpp/mastodonpp.hpp>
#include <iostream>
int main()
{
std::cout << "Maximum characters per post: "
auto answer{connection.
get(mastodonpp::API::v1::instance)};
if (answer)
{
std::cout << answer << std::endl;
}
}