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/timeline.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/timeline.h (limited to 'src/timeline.h') diff --git a/src/timeline.h b/src/timeline.h new file mode 100644 index 0000000..60ce78d --- /dev/null +++ b/src/timeline.h @@ -0,0 +1,31 @@ +#ifndef TIMELINE_H_D359681C +#define TIMELINE_H_D359681C + +#include +#include +#include +#include "auth.h" +#include "tweet.h" + +namespace twitter { + + class timeline { + public: + + timeline( + const auth& tauth, + std::string url); + + std::list poll(); + + private: + + const auth& auth_; + std::string url_; + bool hasSince_ = false; + tweet_id sinceId_; + }; + +} + +#endif /* end of include guard: TIMELINE_H_D359681C */ -- cgit 1.4.1