Class: WeiboOAuth2::Api::V2::Tags

Inherits:
Base
  • Object
show all
Defined in:
lib/weibo_2/api/v2/tags.rb

Instance Method Summary collapse

Methods inherited from Base

#hashie, #initialize

Constructor Details

This class inherits a constructor from WeiboOAuth2::Api::V2::Base

Instance Method Details

#create(tags, opt = {}) ⇒ Object

write interfaces



21
22
23
# File 'lib/weibo_2/api/v2/tags.rb', line 21

def create(tags, opt={})
  hashie post("tags/create.json", :params => {:tags => tags}.merge(opt))
end

#destroy(tag_id, opt = {}) ⇒ Object



25
26
27
# File 'lib/weibo_2/api/v2/tags.rb', line 25

def destroy(tag_id, opt={})
  hashie post("tags/destroy.json", :params => {:tag_id => tag_id}.merge(opt))
end

#destroy_batch(ids, opt = {}) ⇒ Object



29
30
31
# File 'lib/weibo_2/api/v2/tags.rb', line 29

def destroy_batch(ids, opt={})
  hashie post("tags/destroy_batch.json", :params => {:ids => ids}.merge(opt))
end

#suggestions(opt = {}) ⇒ Object



15
16
17
# File 'lib/weibo_2/api/v2/tags.rb', line 15

def suggestions(opt={})
  hashie get("tags/suggestions.json", :params => opt)
end

#tags(uid, opt = {}) ⇒ Object

read interfaces



7
8
9
# File 'lib/weibo_2/api/v2/tags.rb', line 7

def tags(uid, opt={})
  hashie get("tags.json", :params => {:uid => uid}.merge(opt))
end

#tags_batch(uids, opt = {}) ⇒ Object



11
12
13
# File 'lib/weibo_2/api/v2/tags.rb', line 11

def tags_batch(uids, opt={})
  hashie get("tags/tags_batch.json", :params => {:uids => uids}.merge(opt))
end