Module: Trubl::API::Hashtags
- Included in:
- Client
- Defined in:
- lib/trubl/api/hashtags.rb
Instance Method Summary collapse
- #follow_hashtag(uid) ⇒ Object
-
#retrieve_hashtag(uid) ⇒ Object
returns Trubl::Hashtag instance or nil.
-
#retrieve_hashtag_touts(uid, order = nil, per_page = nil, page = nil) ⇒ Object
implements http://developer.tout.com/api/hashtags-api/apimethod/retrieve-hashtags-touts returns Array of Trubl::Hastag instances or nil.
-
#retrieve_suggested_hashtags(q, limit = nil) ⇒ Object
implements http://developer.tout.com/api/conversation-api/apimethod/retrieve-conversation returns Array of Trubl::Hastag instances or nil.
-
#retrieve_trending_hashtags(per_page = nil, page = nil) ⇒ Object
http://developer.tout.com/api/hashtags-api/apimethod/retrieve-list-trending-hashtags returns Array of Trubl::Hastag instances or nil.
- #unfollow_hashtag(uid) ⇒ Object
Instance Method Details
#follow_hashtag(uid) ⇒ Object
35 36 37 |
# File 'lib/trubl/api/hashtags.rb', line 35 def follow_hashtag(uid) post("/api/v1/hashtags/#{uid}/subscribes") end |
#retrieve_hashtag(uid) ⇒ Object
returns Trubl::Hashtag instance or nil
9 10 11 12 |
# File 'lib/trubl/api/hashtags.rb', line 9 def retrieve_hashtag(uid) response = get("hashtags/#{uid}") Trubl::Hashtag.new.from_response(response) end |
#retrieve_hashtag_touts(uid, order = nil, per_page = nil, page = nil) ⇒ Object
implements http://developer.tout.com/api/hashtags-api/apimethod/retrieve-hashtags-touts returns Array of Trubl::Hastag instances or nil
16 17 18 19 |
# File 'lib/trubl/api/hashtags.rb', line 16 def retrieve_hashtag_touts(uid, order=nil, per_page=nil, page=nil) response = get("hashtags/#{uid}/touts", query: {order: order, per_page: per_page, page: page}) Trubl::Touts.new.from_response(response) end |
#retrieve_suggested_hashtags(q, limit = nil) ⇒ Object
implements http://developer.tout.com/api/conversation-api/apimethod/retrieve-conversation returns Array of Trubl::Hastag instances or nil
30 31 32 33 |
# File 'lib/trubl/api/hashtags.rb', line 30 def (q, limit=nil) response = get("suggested_hashtags", query: {q: q, limit: limit}) Trubl::Hashtags.new.from_response(response) end |
#retrieve_trending_hashtags(per_page = nil, page = nil) ⇒ Object
http://developer.tout.com/api/hashtags-api/apimethod/retrieve-list-trending-hashtags returns Array of Trubl::Hastag instances or nil
23 24 25 26 |
# File 'lib/trubl/api/hashtags.rb', line 23 def (per_page=nil, page=nil) response = get("trending_hashtags", query: {per_page: per_page, page: page}) Trubl::Hashtags.new.from_response(response) end |
#unfollow_hashtag(uid) ⇒ Object
39 40 41 |
# File 'lib/trubl/api/hashtags.rb', line 39 def unfollow_hashtag(uid) delete("/api/v1/hashtags/#{uid}/subscribes") end |