Changeset - d7f234fb19cb
[Not reviewed]
0 2 0
Vitaly Takmazov - 13 years ago 2012-12-10 13:04:14
vitalyster@gmail.com
use retweeted_status when available
2 files changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/twitter/TwitterResponseParser.cpp
Show inline comments
 
@@ -46,6 +46,9 @@ EmbeddedStatus getEmbeddedStatus(const Swift::ParserElement::ref &element, const
 
	status.setRetweetCount( atoi( element->getChild(TwitterReponseTypes::retweet_count, xmlns)->getText().c_str() ) );
 
	status.setFavorited( std::string( element->getChild(TwitterReponseTypes::favorited, xmlns)->getText() )=="true" );
 
	status.setRetweeted( std::string( element->getChild(TwitterReponseTypes::retweeted, xmlns)->getText() )=="true" );
 
	if (status.isRetweeted()) {
 
		status.setTweet( std::string( element->getChild(TwitterReponseTypes::retweeted_status, xmlns)->getText() ) );
 
	}
 
	return status;
 
}
 

	
 
@@ -88,6 +91,9 @@ Status getStatus(const Swift::ParserElement::ref &element, const std::string xml
 
	status.setRetweetCount( atoi( element->getChild(TwitterReponseTypes::retweet_count, xmlns)->getText().c_str() ) );
 
	status.setFavorited( std::string( element->getChild(TwitterReponseTypes::favorited, xmlns)->getText() )=="true" );
 
	status.setRetweeted( std::string( element->getChild(TwitterReponseTypes::retweeted, xmlns)->getText() )=="true" );
 
	if (status.isRetweeted()) {
 
		status.setTweet( std::string( element->getChild(TwitterReponseTypes::retweeted_status, xmlns)->getText() ) );
 
	}
 
	return status;
 
}
 

	
backends/twitter/TwitterResponseParser.h
Show inline comments
 
@@ -20,6 +20,7 @@ namespace TwitterReponseTypes
 
	const std::string in_reply_to_user_id = "in_reply_to_user_id";
 
	const std::string in_reply_to_screen_name = "in_reply_to_screen_name";
 
	const std::string retweet_count = "retweet_count";
 
	const std::string retweeted_status = "retweeted_status";
 
	const std::string favorited = "favorited";
 
	const std::string retweeted = "retweeted";
 
	const std::string user = "user";
0 comments (0 inline, 0 general)