module Trubl::API::Hashtags

Public Instance Methods

follow_hashtag(uid) click to toggle source
# File lib/trubl/api/hashtags.rb, line 35
def follow_hashtag(uid)
  post("/api/v1/hashtags/#{uid}/subscribes")
end
retrieve_hashtag(uid) click to toggle source

returns Trubl::Hashtag instance or nil

# 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) click to toggle source

implements developer.tout.com/api/hashtags-api/apimethod/retrieve-hashtags-touts returns Array of Trubl::Hastag instances or nil

# 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) click to toggle source

implements developer.tout.com/api/conversation-api/apimethod/retrieve-conversation returns Array of Trubl::Hastag instances or nil

# File lib/trubl/api/hashtags.rb, line 30
def retrieve_suggested_hashtags(q, limit=nil)
  response = get("suggested_hashtags", query: {q: q, limit: limit})
  Trubl::Hashtags.new.from_response(response)
end
unfollow_hashtag(uid) click to toggle source
# File lib/trubl/api/hashtags.rb, line 39
def unfollow_hashtag(uid)
  delete("/api/v1/hashtags/#{uid}/subscribes")
end