From 38203b745ae1903ba0804ed5532b78d255bea635 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 5 Aug 2018 11:14:39 -0400 Subject: Added timeline polling Because the streaming API will sunset on August 16th, it is essential to implement timeline polling so that the library can still be used to access tweets. This commit breaks the current API even for clients still using the streaming API because the OAuth connection data was pulled from twitter::client into twitter::auth. Other than that, almost everything works the same, and if a client wants to update their libtwitter++ within the next week and a half, they are free to. --- src/tweet.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/tweet.cpp') diff --git a/src/tweet.cpp b/src/tweet.cpp index 864bcd8..1c869f9 100644 --- a/src/tweet.cpp +++ b/src/tweet.cpp @@ -12,13 +12,13 @@ namespace twitter { auto json = nlohmann::json::parse(data); _id = json["id"].get(); _text = json["text"].get(); - _author = make_unique(json["user"].dump()); + _author = std::make_unique(json["user"].dump()); if (!json["retweeted_status"].is_null()) { _is_retweet = true; - _retweeted_status = make_unique(json["retweeted_status"].dump()); + _retweeted_status = std::make_unique(json["retweeted_status"].dump()); } if (!json["entities"].is_null()) @@ -45,12 +45,12 @@ namespace twitter { _valid = other._valid; _id = other._id; _text = other._text; - _author = make_unique(*other._author); + _author = std::make_unique(*other._author); _is_retweet = other._is_retweet; if (_is_retweet) { - _retweeted_status = make_unique(*other._retweeted_status); + _retweeted_status = std::make_unique(*other._retweeted_status); } _mentions = other._mentions; -- cgit 1.4.1