# twitterland Twitterland is a Ruby gem that bundles various Twitter-related APIs Including: * Follow Cost * Twitter Grader * Mr. Tweet * Twinfluence * Twitter Counter * TweetBlocker * Thumbfight ### Install sudo gem install twitterland ### Follow Cost Usage # Get follow cost for specified user Twitterland::FollowCost.show('bradleyjoyce') => ### Twitter Grader Usage # request your api key at [http://twitter.grader.com/accessrequestform](http://twitter.grader.com/accessrequestform) # get twitter grade for user api_key = "OU812" Twitterland::TwitterGrader.grade('bradleyjoyce', api_key) => 98.4183 ### Mr.Tweet Usage ##### get your api key at [http://api.mrtweet.com/newapi](http://api.mrtweet.com/newapi) #### Initialize Mrtweet api_key = 'OU812' mt = Twitterland::Mrtweet.new(api_key,'bradleyjoyce') #### Is user # Check whether the given user is a MrTweet user. mt.is_user => true #### Profile # Returns MrTweet statistics of the given user mt.profile => mt.profile.links => 0.53 #### Recommendations # Returns the latest recommendations the given user received on MrTweet mt.recommendations => [] mt.recommendations.first.name => "billtrammel" #### Most attention towards # Returns the twitter_id's of 3 users that for the given user pays the most attention to mt.most_attenion_towards => [15049040, 17993906, 22286046] #### Recommend # Creates a recommendation from the given user, to another user (aka "friend_name") reason = "Wynn is an awesome entrepreneur, rubyist, designer and friend! Follow him for his useful and entertaining tweets!" friend_name = "pengwynn" mt.recommend(reason,friend_name) => true ### Twinfluence #### Initialize Twinfluence username = 'bradleyjoyce' password = 'mypassword' t = Twitterland::Twinfluence.new(username,password) => # #### User # gets twinfluence data for user t.user('bradleyjoyce') t.user('bradleyjoyce') => , ]> centralization="24.224443556856" centralization_grade="0.0 Average - Resilient" description="Entrepreneur and Web Developer -- Floxee.com, TweetCongress.org, Sherflock.com, Squeejee.com" followers_count="1315" friends_count="1278" id="14688076" location=nil name="Bradley Joyce" screen_name="bradleyjoyce" second_order="7936664" second_order_grade="Rank: #10,185 (93%)" social_capital="6035.4859315589" social_capital_grade="+1.4 High" statuses_count="3511" unix_timestamp="1249683954" url="http://bradleyjoyce.me" velocity="15535.453112211" velocity_grade="+0.1 Fast Average">> ### Twitter Counter #### Show tc = Twitterland::TwitterCounter.show('bradleyjoyce') tc.rank => 37194 # available methods tomorrow_2w followers_2w_ago followers_yesterday followers_current friends_current next_month growth_since_2w started_followers rank user_id growth_since follow_days tomorrow next_month_2w average_growth average_growth_2w ### TweetBlocker #### User # get grade for user result = Twitterland::TweetBlocker.user('bradleyjoyce') => #### Spam # report a user as spammer Twitterland::TweetBlocker.report_spam('spamtest') #### Rate Limit Status # check your rate limit status Twitterland::TweetBlocker.rate_limit => ### BackTweets Get your api_key at [http://www.backtype.com/developers](http://www.backtype.com/developers) #### Search # Return tweet referencing a URL results = Twitterland::BackTweets.search('http://squeejee.com', 'OU812') results.tweets.size => 25 results.tweets.first.from_user => "euromarianne" results.items_per_page => 25 results.total_results => 3301 ### Thumbfight #### Usage # Get follow cost for single search term Twitterland::Thumbfight.fight('apple') => > # Get follow cost for two search terms Twitterland::Thumbfight.fight('apple', 'microsoft') => challenger2=> ### Source [http://github.com/squeejee/twitterland/](http://github.com/squeejee/twitterland/) ### Documentation [http://rdoc.info/projects/squeejee/twitterland](http://rdoc.info/projects/squeejee/twitterland) ### Copyright Copyright (c) 2009 Squeejee. See LICENSE for details.