Class: BackTyper::Tweets
Class Method Summary collapse
-
.by_url(q, options = {}) ⇒ Object
Retrieve tweets that link to a given URL, whether the links are shortened or unshortened.
-
.count(q, options = {}) ⇒ Object
Retrieve the number of tweets that link to a particular URL.
-
.good(q, options = {}) ⇒ Object
Retrieve filtered tweets that link to a given URL with both shortened and unshortened links.
Methods inherited from Client
Class Method Details
.by_url(q, options = {}) ⇒ Object
Retrieve tweets that link to a given URL, whether the links are shortened or unshortened.
q = The url to return number of tweets for
19 20 21 22 |
# File 'lib/backtyper/tweets.rb', line 19 def self.by_url(q, ={}) response = get('/tweets/search/links.json', :query => {:q => q}.merge()) handle_response(response) end |
.count(q, options = {}) ⇒ Object
Retrieve the number of tweets that link to a particular URL.
q = The url to return number of tweets for
9 10 11 12 |
# File 'lib/backtyper/tweets.rb', line 9 def self.count(q, ={}) response = get('/tweetcount.json', :query => {:q => q}.merge()) handle_response(response) end |
.good(q, options = {}) ⇒ Object
Retrieve filtered tweets that link to a given URL with both shortened and unshortened links. This returns a subset of Tweets by URL, but it filters tweets linking to a URL for quality. This skips all the tweets that only contain the page title, etc.
q = The url to return number of tweets for
31 32 33 34 |
# File 'lib/backtyper/tweets.rb', line 31 def self.good(q, ={}) response = get('/goodtweets.json', :query => {:q => q}.merge()) handle_response(response) end |