Module: Topsy
- Defined in:
- lib/topsy/tag.rb,
lib/topsy.rb,
lib/topsy/page.rb,
lib/topsy/tweet.rb,
lib/topsy/trend.rb,
lib/topsy/stats.rb,
lib/topsy/target.rb,
lib/topsy/author.rb,
lib/topsy/client.rb,
lib/topsy/version.rb,
lib/topsy/url_info.rb,
lib/topsy/linkpost.rb,
lib/topsy/search_counts.rb,
lib/topsy/linkpost_count.rb,
lib/topsy/rate_limit_info.rb,
lib/topsy/link_search_result.rb
Overview
This is the link_search_result class for the topsy library. A LinkSearchResult has the following attributes:
"trackback_permalink" : "http://twitter.com/ewerickson/status/3562164195",
"hits" : 38,
"trackback_total" : 157,
"topsy_trackback_url" : "http://topsy.com/tb/www.redstate.com/erick/2009/08/26/breaking-rumors-surface-that-leon-panetta-is-resigning/",
"url" : "http://www.redstate.com/erick/2009/08/26/breaking-rumors-surface-that-leon-panetta-is-resigning/",
"content" : "Panetta is rumored to have sent a resignation letter to Barack Obama today: http://bit.ly/CDMg9",
"title" : "BREAKING: Rumors Surface That Leon Panetta is Resigning - Erick??????s blog - RedState",
"score" : 0.75521481,
"highlight" : "Panetta is rumored to have sent a resignation letter to
<span class=\"highlight-term\">Barack</span> <span class=\"highlight-term\">Obama</span> today: http://bit.ly/CDMg9"
According to the official Topsy doc: code.google.com/p/otterapi/wiki/Resources?tm=6#/search
Defined Under Namespace
Classes: Author, Client, General, InformTopsy, LinkSearchResult, Linkpost, LinkpostCount, NotFound, Page, RateLimitExceeded, RateLimitInfo, SearchCounts, Stats, Tag, Target, TopsyError, Trend, Tweet, Unauthorized, Unavailable, UrlInfo
Constant Summary
- VERSION =
'0.3.4'
Class Method Summary (collapse)
-
+ (Topsy::Author) author_info(url)
Returns profile information for an author (a twitter profile indexed by Topsy).
-
+ (Topsy::Page) author_search(q, options = {})
Returns list of authors that talk about the query.
-
+ (Topsy::RateLimitInfo) credit
Returns info about API rate limiting.
-
+ (Topsy::LinkpostCount) link_post_count(url, options = {})
Returns count of links posted by an author.
-
+ (Topsy::Page) link_posts(url, options = {})
Returns list of URLs posted by an author.
-
+ (Topsy::Page) profile_search(q, options = {})
Returns list list of author profiles that match the query.
- + (Object) rate_limit
- + (Object) rate_limit=(info)
-
+ (Topsy::Page) related(url, options = {})
Returns list of URLs related to a given URL.
-
+ (Topsy::Page) search(q, options = {})
Returns list of results for a query.
-
+ (Topsy::SearchCounts) search_count(q)
Returns count of results for a search query.
-
+ (Topsy::Stats) stats(url, options = {})
Returns counts of tweets for a URL.
-
+ (Topsy::Page) tags(url, options = {})
Returns list of tags for a URL.
-
+ (Topsy::Page) trackbacks(url, options = {})
Returns list of tweets (trackbacks) that mention the query URL, most recent first.
-
+ (Topsy::Page) trending(options = {})
Returns list of trending terms.
-
+ (Topsy::UrlInfo) url_info(url)
Returns info about a URL.
Class Method Details
+ (Topsy::Author) author_info(url)
Returns profile information for an author (a twitter profile indexed by Topsy). The response contains the name, description (biography) and the influence level of the author
31 32 33 |
# File 'lib/topsy.rb', line 31 def self.(url) Topsy::Client.new.(url) end |
+ (Topsy::Page) author_search(q, options = {})
Returns list of authors that talk about the query. The list is sorted by frequency of posts and the influence of authors.
44 45 46 47 |
# File 'lib/topsy.rb', line 44 def self.(q, ={}) result = Topsy::Client.new.(q, ) Topsy::Page.new(result, Topsy::Author) end |
+ (Topsy::RateLimitInfo) credit
Returns info about API rate limiting
170 171 172 |
# File 'lib/topsy.rb', line 170 def self.credit Topsy::Client.new.credit end |
+ (Topsy::LinkpostCount) link_post_count(url, options = {})
Returns count of links posted by an author. This is the efficient, count-only version of /linkposts
67 68 69 70 |
# File 'lib/topsy.rb', line 67 def self.link_post_count(url, ={}) response = Topsy::Client.new.link_post_count(url, ) Topsy::LinkpostCount.new(response) end |
+ (Topsy::Page) link_posts(url, options = {})
Returns list of URLs posted by an author
57 58 59 |
# File 'lib/topsy.rb', line 57 def self.link_posts(url, ={}) Topsy::Client.new.link_posts(url, ) end |
+ (Topsy::Page) profile_search(q, options = {})
Returns list list of author profiles that match the query. The query is matched against the nick, name and biography information and the results are sorted by closeness of match and the influence of authors.
79 80 81 |
# File 'lib/topsy.rb', line 79 def self.profile_search(q, ={}) Topsy::Client.new.profile_search(q, ) end |
+ (Object) rate_limit
175 176 177 178 |
# File 'lib/topsy.rb', line 175 def self.rate_limit self.credit if @rate_limit_info.nil? @rate_limit_info end |
+ (Object) rate_limit=(info)
180 181 182 |
# File 'lib/topsy.rb', line 180 def self.rate_limit=(info) @rate_limit_info = Topsy::RateLimitInfo.new(info) end |
+ (Topsy::Page) related(url, options = {})
Returns list of URLs related to a given URL
90 91 92 |
# File 'lib/topsy.rb', line 90 def self.(url, ={}) Topsy::Client.new.(url, ) end |
+ (Topsy::Page) search(q, options = {})
Returns list of results for a query.
102 103 104 |
# File 'lib/topsy.rb', line 102 def self.search(q, ={}) Topsy::Client.new.search(q, ) end |
+ (Topsy::SearchCounts) search_count(q)
Returns count of results for a search query.
110 111 112 |
# File 'lib/topsy.rb', line 110 def self.search_count(q) Topsy::Client.new.search_count(q) end |
+ (Topsy::Stats) stats(url, options = {})
Returns counts of tweets for a URL
120 121 122 |
# File 'lib/topsy.rb', line 120 def self.stats(url, ={}) Topsy::Client.new.stats(url, ) end |
+ (Topsy::Page) tags(url, options = {})
Returns list of tags for a URL.
131 132 133 |
# File 'lib/topsy.rb', line 131 def self.(url, ={}) Topsy::Client.new.(url, ) end |
+ (Topsy::Page) trackbacks(url, options = {})
Returns list of tweets (trackbacks) that mention the query URL, most recent first.
144 145 146 |
# File 'lib/topsy.rb', line 144 def self.trackbacks(url, ={}) Topsy::Client.new.trackbacks(url, ) end |
+ (Topsy::Page) trending(options = {})
Returns list of trending terms
155 156 157 |
# File 'lib/topsy.rb', line 155 def self.trending(={}) Topsy::Client.new.trending() end |
+ (Topsy::UrlInfo) url_info(url)
Returns info about a URL
163 164 165 |
# File 'lib/topsy.rb', line 163 def self.url_info(url) Topsy::Client.new.url_info(url) end |