updated header location for mastodon-cpp
This commit is contained in:
parent
717d49175a
commit
1f69e0cd62
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.7)
|
cmake_minimum_required (VERSION 3.7)
|
||||||
project (mastobotmon
|
project (mastobotmon
|
||||||
VERSION 0.3.3
|
VERSION 0.3.4
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Tested OS: Linux
|
* Tested OS: Linux
|
||||||
* C++ compiler (tested: gcc 6.4, clang 5.0)
|
* C++ compiler (tested: gcc 6.4, clang 5.0)
|
||||||
* [cmake](https://cmake.org/) (tested: 3.9.6)
|
* [cmake](https://cmake.org/) (tested: 3.9.6)
|
||||||
* [mastodon-cpp](https://github.com/tastytea/mastodon-cpp) (at least: 0.6.0)
|
* [mastodon-cpp](https://github.com/tastytea/mastodon-cpp) (at least: 0.8.6)
|
||||||
* [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (tested: 1.8.1)
|
* [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (tested: 1.8.1)
|
||||||
|
|
||||||
## Get sourcecode
|
## Get sourcecode
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <mastodon-cpp.hpp>
|
#include <mastodon-cpp/mastodon-cpp.hpp>
|
||||||
#include "version.hpp"
|
#include "version.hpp"
|
||||||
#include "mastobotmon.hpp"
|
#include "mastobotmon.hpp"
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,8 @@ int main(int argc, char *argv[])
|
||||||
uint16_t ret = acc.get(Mastodon::API::v1::accounts_verify_credentials, answer);
|
uint16_t ret = acc.get(Mastodon::API::v1::accounts_verify_credentials, answer);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
if (std::stoi(acc.get_header("X-RateLimit-Remaining")) < 2)
|
if (!acc.get_header("X-RateLimit-Remaining").empty() &&
|
||||||
|
std::stoi(acc.get_header("X-RateLimit-Remaining")) < 2)
|
||||||
{
|
{
|
||||||
cerr << "ERROR: Reached limit of API calls.\n";
|
cerr << "ERROR: Reached limit of API calls.\n";
|
||||||
cerr << "Counter will reset at " << acc.get_header("X-RateLimit-Reset") << '\n';
|
cerr << "Counter will reset at " << acc.get_header("X-RateLimit-Reset") << '\n';
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <jsoncpp/json/json.h>
|
#include <jsoncpp/json/json.h>
|
||||||
#include <mastodon-cpp.hpp>
|
#include <mastodon-cpp/mastodon-cpp.hpp>
|
||||||
|
|
||||||
using std::uint16_t;
|
using std::uint16_t;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
Loading…
Reference in New Issue