Class: BackTyper::Comments

Inherits:
Client
  • Object
show all
Defined in:
lib/backtyper/comments.rb

Class Method Summary collapse

Methods inherited from Client

authenticate, rate_limit

Class Method Details

.by_url(url, options = {}) ⇒ Object

Retrieve excerpts of comments published on a particular page.

url = The post url to return comments for


9
10
11
12
# File 'lib/backtyper/comments.rb', line 9

def self.by_url(url, options={})
  response = get('/post/comments.json', :query => {:url => url}.merge(options))
  handle_response(response)
end

.connect(url, options = {}) ⇒ Object

Retrieve all conversations related to a given URL.

url = The URL you want related conversations for
sources = Comma delimited list of source titles (native, blog, digg, reddit, yc, friendfeed, twitter) or blog ID.
sort = If set to 1, results will be ordered by the date they were found by BackType.


21
22
23
24
# File 'lib/backtyper/comments.rb', line 21

def self.connect(url, options={})
  response = get('/connect.json', :query => {:url => url}.merge(options))
  handle_response(response)
end

.connect_stats(url, options = {}) ⇒ Object

Retrieve statistics on the conversations related to a given URL.

url = The URL you want related conversations for


31
32
33
34
# File 'lib/backtyper/comments.rb', line 31

def self.connect_stats(url, options={})
  response = get('/comments/connect/stats.json', :query => {:url => url}.merge(options))
  handle_response(response)
end