Changeset - f1c11320c7d7
[Not reviewed]
0 3 0
Sarang Bharadwaj - 13 years ago 2012-05-29 16:08:29
sarang.bh@gmail.com
User timeline
3 files changed with 21 insertions and 1 deletions:
0 comments (0 inline, 0 general)
backends/twitter/libtwitcurl/twitcurl.cpp
Show inline comments
 
@@ -424,6 +424,24 @@ bool twitCurl::timelinePublicGet()
 
                       twitCurlDefaults::TWITCURL_EXTENSIONFORMATS[m_eApiFormatType] );
 
}
 
 
/*++
 
* @method: twitCurl::timelineHomeGet
 
*
 
* @description: method to get home timeline
 
*
 
* @input: none
 
*
 
* @output: true if GET is success, otherwise false. This does not check http
 
*          response by twitter. Use getLastWebResponse() for that.
 
*
 
*--*/
 
bool twitCurl::timelineHomeGet()
 
{
 
    /* Perform GET */
 
    return performGet( twitterDefaults::TWITCURL_HOME_TIMELINE_URL +
 
                       twitCurlDefaults::TWITCURL_EXTENSIONFORMATS[m_eApiFormatType] );
 
}
 
 
/*++
 
* @method: twitCurl::featuredUsersGet
 
*
backends/twitter/libtwitcurl/twitcurl.h
Show inline comments
 
@@ -146,6 +146,7 @@ public:
 
    bool statusDestroyById( std::string& statusId /* in */ );
 
 
    /* Twitter timeline APIs */
 
    bool timelineHomeGet();
 
    bool timelinePublicGet();
 
    bool timelineFriendsGet();
 
    bool timelineUserGet( bool trimUser /* in */, bool includeRetweets /* in */, unsigned int tweetCount /* in */, std::string userInfo = "" /* in */, bool isUserId = false /* in */ );
backends/twitter/main.cpp
Show inline comments
 
@@ -12,6 +12,7 @@
 
#include "sys/signal.h"
 
#include <boost/algorithm/string.hpp>
 
#include "twitcurl.h"
 
#include "Swiften/Parser/StringTreeParser.h"
 

	
 
#include <iostream>
 
#include <sstream>
 
@@ -228,7 +229,7 @@ class TwitterPlugin : public NetworkPlugin {
 
					}
 
					
 
					std::string replyMsg; 
 
					if( sessions[user]->timelinePublicGet() ) {
 
					if( sessions[user]->timelinePublicGet()/*(false, false, 20, sessions[user]->getTwitterUsername(), true)*/ ) {
 
						sessions[user]->getLastWebResponse( replyMsg );
 
						LOG4CXX_INFO(logger, "twitCurl::timeline web response: " << replyMsg );
 
						handleMessage(user, "twitter-account", replyMsg);
0 comments (0 inline, 0 general)