Class: Weibo::Api::V2::Place

Inherits:
Base
  • Object
show all
Defined in:
lib/weibo_focus/api/v2/place.rb

Instance Method Summary collapse

Methods inherited from Base

#hashie, #initialize

Constructor Details

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

Instance Method Details

#friends_timeline(opt = {}) ⇒ Object



10
11
12
# File 'lib/weibo_focus/api/v2/place.rb', line 10

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

#nearby_photos(lat, long, opt = {}) ⇒ Object



82
83
84
# File 'lib/weibo_focus/api/v2/place.rb', line 82

def nearby_photos(lat, long, opt={})
  hashie get("place/nearby/photos.json", :params => {:lat => lat, :long => long}.merge(opt))
end

#nearby_pois(lat, long, opt = {}) ⇒ Object



74
75
76
# File 'lib/weibo_focus/api/v2/place.rb', line 74

def nearby_pois(lat, long, opt={})
  hashie get("place/nearby/pois.json", :params => {:lat => lat, :long => long}.merge(opt))
end

#nearby_timeline(lat, long, opt = {}) ⇒ Object



22
23
24
# File 'lib/weibo_focus/api/v2/place.rb', line 22

def nearby_timeline(lat, long, opt={})
  hashie get("place/nearby_timeline.json", :params => {:lat => lat, :long => long}.merge(opt))
end

#nearby_users(lat, long, opt = {}) ⇒ Object



78
79
80
# File 'lib/weibo_focus/api/v2/place.rb', line 78

def nearby_users(lat, long, opt={})
  hashie get("place/nearby/users.json", :params => {:lat => lat, :long => long}.merge(opt))
end

#nearby_users_create(lat, long, opt = {}) ⇒ Object



113
114
115
# File 'lib/weibo_focus/api/v2/place.rb', line 113

def nearby_users_create(lat, long, opt={})
  hashie post("place/nearby_users/create.json", :params => {:lat => lat, :long => long}.merge(opt))
end

#nearby_users_destroy(opt = {}) ⇒ Object



117
118
119
# File 'lib/weibo_focus/api/v2/place.rb', line 117

def nearby_users_destroy(opt={})
  hashie post("place/nearby_users/destroy.json", :params => opt)
end

#nearby_users_list(lat, long, opt = {}) ⇒ Object



86
87
88
# File 'lib/weibo_focus/api/v2/place.rb', line 86

def nearby_users_list(lat, long, opt={})
  hashie get("place/nearby_users/list.json", :params => {:lat => lat, :long => long}.merge(opt))
end

#poi_timeline(poiid, opt = {}) ⇒ Object



18
19
20
# File 'lib/weibo_focus/api/v2/place.rb', line 18

def poi_timeline(poiid, opt={})
  hashie get("place/poi_timeline.json", :params => {:poiid => poiid}.merge(opt))
end

#pois_add_checkin(poiid, status, opt = {}) ⇒ Object



96
97
98
# File 'lib/weibo_focus/api/v2/place.rb', line 96

def pois_add_checkin(poiid, status, opt={})
  hashie post("place/pois/add_checkin.json", :params => {:poiid => poiid, :status => status}.merge(opt))
end

#pois_add_photo(poiid, status, pic, opt = {}) ⇒ Object



100
101
102
103
# File 'lib/weibo_focus/api/v2/place.rb', line 100

def pois_add_photo(poiid, status, pic, opt={})
  multipart = Base.build_multipart_bodies({"poiid" => poiid, "status" => status, "pic" => pic}.merge(opt))
  hashie post("place/pois/add_photo.json", :headers => multipart[:headers], :body => multipart[:body])
end

#pois_add_tip(poiid, status, opt = {}) ⇒ Object



105
106
107
# File 'lib/weibo_focus/api/v2/place.rb', line 105

def pois_add_tip(poiid, status, opt={})
  hashie post("place/pois/add_tip.json", :params => {:poiid => poiid, :status => status}.merge(opt))
end

#pois_add_todo(poiid, status, opt = {}) ⇒ Object



109
110
111
# File 'lib/weibo_focus/api/v2/place.rb', line 109

def pois_add_todo(poiid, status, opt={})
  hashie post("place/pois/create.json", :params => {:poiid => poiid, :status => status}.merge(opt))
end

#pois_category(opt = {}) ⇒ Object



70
71
72
# File 'lib/weibo_focus/api/v2/place.rb', line 70

def pois_category(opt={})
  hashie get("place/pois/category.json", :params => opt)
end

#pois_create(title, lat, long, city, opt = {}) ⇒ Object

write interfaces



92
93
94
# File 'lib/weibo_focus/api/v2/place.rb', line 92

def pois_create(title, lat, long, city, opt={})
  hashie post("place/pois/create.json", :params => {:title => title, :lat => lat, :long => long, :city => city}.merge(opt))
end

#pois_photos(poiid, opt = {}) ⇒ Object



62
63
64
# File 'lib/weibo_focus/api/v2/place.rb', line 62

def pois_photos(poiid, opt={})
  hashie get("place/pois/photos.json", :params => {:poiid => poiid}.merge(opt))
end

#pois_search(keyword, opt = {}) ⇒ Object



66
67
68
# File 'lib/weibo_focus/api/v2/place.rb', line 66

def pois_search(keyword, opt={})
  hashie get("place/pois/search.json", :params => {:keyword => keyword}.merge(opt))
end

#pois_show(poiid, opt = {}) ⇒ Object



50
51
52
# File 'lib/weibo_focus/api/v2/place.rb', line 50

def pois_show(poiid, opt={})
  hashie get("place/pois/show.json", :params => {:poiid => poiid}.merge(opt))
end

#pois_tips(poiid, opt = {}) ⇒ Object



58
59
60
# File 'lib/weibo_focus/api/v2/place.rb', line 58

def pois_tips(poiid, opt={})
  hashie get("place/pois/tips.json", :params => {:poiid => poiid}.merge(opt))
end

#pois_users(poiid, opt = {}) ⇒ Object



54
55
56
# File 'lib/weibo_focus/api/v2/place.rb', line 54

def pois_users(poiid, opt={})
  hashie get("place/pois/users.json", :params => {:poiid => poiid}.merge(opt))
end

#public_timeline(opt = {}) ⇒ Object

read interfaces



6
7
8
# File 'lib/weibo_focus/api/v2/place.rb', line 6

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

#statuses_show(id, opt = {}) ⇒ Object



26
27
28
# File 'lib/weibo_focus/api/v2/place.rb', line 26

def statuses_show(id, opt={})
  hashie get("place/statuses/show.json", :params => {:id => id}.merge(opt))
end

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



14
15
16
# File 'lib/weibo_focus/api/v2/place.rb', line 14

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

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



34
35
36
# File 'lib/weibo_focus/api/v2/place.rb', line 34

def users_checkins(uid, opt={})
  hashie get("place/users/checkins.json", :params => {:uid => uid}.merge(opt))
end

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



38
39
40
# File 'lib/weibo_focus/api/v2/place.rb', line 38

def users_photos(uid, opt={})
  hashie get("place/users/photos.json", :params => {:uid => uid}.merge(opt))
end

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



30
31
32
# File 'lib/weibo_focus/api/v2/place.rb', line 30

def users_show(uid, opt={})
  hashie get("place/users/show.json", :params => {:uid => uid}.merge(opt))
end

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



42
43
44
# File 'lib/weibo_focus/api/v2/place.rb', line 42

def users_tips(uid, opt={})
  hashie get("place/users/tips.json", :params => {:uid => uid}.merge(opt))
end

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



46
47
48
# File 'lib/weibo_focus/api/v2/place.rb', line 46

def users_todos(uid, opt={})
  hashie get("place/users/todos.json", :params => {:uid => uid}.merge(opt))
end