Class: Backtype::Base
- Inherits:
-
Object
- Object
- Backtype::Base
- Defined in:
- lib/backtype/base.rb
Instance Method Summary collapse
- #comments_by_author_url(params = {}) ⇒ Object
- #comments_by_page(params = {}) ⇒ Object
- #comments_search(params = {}) ⇒ Object
- #comments_stats_by_page(params = {}) ⇒ Object
- #connect(params = {}) ⇒ Object
- #connect_stats(params = {}) ⇒ Object
-
#initialize(params = {}) ⇒ Base
constructor
A new instance of Base.
- #stats_by_url(params = {}) ⇒ Object
- #user_influenced_by(params = {}) ⇒ Object
- #user_influencer_of(params = {}) ⇒ Object
- #user_influencer_score(params = {}) ⇒ Object
- #user_top_sites(params = {}) ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Base
Returns a new instance of Base.
9 10 11 12 |
# File 'lib/backtype/base.rb', line 9 def initialize(params = {}) @api_key = params[:api_key] raise NotAPIKeyGiven unless @api_key end |
Instance Method Details
#comments_by_author_url(params = {}) ⇒ Object
19 20 21 22 |
# File 'lib/backtype/base.rb', line 19 def (params = {}) check_params params, [:url] make_request "url/#{params[:url]}/comments", params end |
#comments_by_page(params = {}) ⇒ Object
34 35 36 37 |
# File 'lib/backtype/base.rb', line 34 def comments_by_page(params = {}) check_params params, [:url] make_request "post/comments", params end |
#comments_search(params = {}) ⇒ Object
14 15 16 17 |
# File 'lib/backtype/base.rb', line 14 def comments_search(params = {}) check_params params, [:q] make_request "comments/search", params end |
#comments_stats_by_page(params = {}) ⇒ Object
39 40 41 42 |
# File 'lib/backtype/base.rb', line 39 def comments_stats_by_page(params = {}) check_params params, [:url] make_request "post/stats", params end |
#connect(params = {}) ⇒ Object
24 25 26 27 |
# File 'lib/backtype/base.rb', line 24 def connect(params = {}) check_params params, [:url] make_request "connect", params end |
#connect_stats(params = {}) ⇒ Object
29 30 31 32 |
# File 'lib/backtype/base.rb', line 29 def connect_stats(params = {}) check_params params, [:url] make_request "comments/connect/stats", params end |
#stats_by_url(params = {}) ⇒ Object
44 45 46 47 |
# File 'lib/backtype/base.rb', line 44 def stats_by_url(params = {}) check_params params, [:q] make_request "tweetcount", params end |
#user_influenced_by(params = {}) ⇒ Object
59 60 61 62 |
# File 'lib/backtype/base.rb', line 59 def user_influenced_by(params = {}) check_params params, [:user_name] make_request "user/influenced_by", params end |
#user_influencer_of(params = {}) ⇒ Object
64 65 66 67 |
# File 'lib/backtype/base.rb', line 64 def user_influencer_of(params = {}) check_params params, [:user_name] make_request "user/influencer_of", params end |
#user_influencer_score(params = {}) ⇒ Object
49 50 51 52 |
# File 'lib/backtype/base.rb', line 49 def user_influencer_score(params = {}) check_params params, [:user_name] make_request "user/influencer_score", params end |
#user_top_sites(params = {}) ⇒ Object
54 55 56 57 |
# File 'lib/backtype/base.rb', line 54 def user_top_sites(params = {}) check_params params, [:user_name] make_request "user/top_sites", params end |