Class: Weibo::Api::V2::Favorites
- Inherits:
-
Base
- Object
- Base
- Weibo::Api::V2::Favorites
show all
- Defined in:
- lib/weibo_focus/api/v2/favorites.rb
Instance Method Summary
collapse
-
#by_tags(tid, opt = {}) ⇒ Object
-
#by_tags_ids(tid, opt = {}) ⇒ Object
-
#create(id, opt = {}) ⇒ Object
-
#destroy(id, opt = {}) ⇒ Object
-
#destroy_batch(ids, opt = {}) ⇒ Object
-
#favorites(opt = {}) ⇒ Object
-
#ids(opt = {}) ⇒ Object
-
#show(id, opt = {}) ⇒ Object
-
#tags(opt = {}) ⇒ Object
-
#tags_destroy_batch(tid, opt = {}) ⇒ Object
-
#tags_update(id, tags, opt = {}) ⇒ Object
-
#tags_update_batch(tid, tag, opt = {}) ⇒ Object
Methods inherited from Base
#hashie, #initialize
Instance Method Details
19
20
21
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 19
def by_tags(tid, opt={})
hashie get("favorites/by_tags.json", :params => {:tid => tid}.merge(opt))
end
|
27
28
29
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 27
def by_tags_ids(tid, opt={})
hashie get("favorites/by_tags/ids.json", :params => {:tid => tid}.merge(opt))
end
|
#create(id, opt = {}) ⇒ Object
32
33
34
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 32
def create(id, opt={})
hashie post("favorites/create.json", :params => {:id => id}.merge(opt))
end
|
#destroy(id, opt = {}) ⇒ Object
36
37
38
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 36
def destroy(id, opt={})
hashie post("favorites/destroy.json", :params => {:id => id}.merge(opt))
end
|
#destroy_batch(ids, opt = {}) ⇒ Object
40
41
42
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 40
def destroy_batch(ids, opt={})
hashie post("favorites/destroy_batch.json", :params => {:ids => ids}.merge(opt))
end
|
#favorites(opt = {}) ⇒ Object
7
8
9
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 7
def favorites(opt={})
hashie get("favorites.json", :params => opt)
end
|
#ids(opt = {}) ⇒ Object
11
12
13
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 11
def ids(opt={})
hashie get("favorites/ids.json", :params => opt)
end
|
#show(id, opt = {}) ⇒ Object
15
16
17
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 15
def show(id, opt={})
hashie get("favorites/show.json", :params => {:id => id}.merge(opt))
end
|
23
24
25
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 23
def tags(opt={})
hashie get("favorites/tags.json", :params => opt)
end
|
52
53
54
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 52
def tags_destroy_batch(tid, opt={})
hashie post("favorites/tags/destroy_batch.json", :params => {:tid => tid}.merge(opt))
end
|
44
45
46
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 44
def tags_update(id, tags, opt={})
hashie post("favorites/tags/update.json", :params => {:id => id, :tags => CGI::escape(tags)}.merge(opt))
end
|
48
49
50
|
# File 'lib/weibo_focus/api/v2/favorites.rb', line 48
def tags_update_batch(tid, tag, opt={})
hashie post("favorites/tags/update_batch.json", :params => {:tid => tid, :tag => CGI::escape(tag)}.merge(opt))
end
|