Class: Weibo2::Interface::Search
- Defined in:
- lib/weibo2/interface/search.rb
Overview
Search API
Instance Method Summary collapse
-
#geo_statuses(longitude, latitude, opts = {}) ⇒ Object
获取指定地点周边的微博列表 [Privilege].
-
#statuses(opts = {}) ⇒ Object
搜索与指定的一个或多个条件相匹配的微博 [Privilege].
-
#suggestions_apps(q, opts = {}) ⇒ Object
搜索应用时的联想搜索建议.
-
#suggestions_at_users(q, type, opts = {}) ⇒ Object
@用户时的联想建议.
-
#suggestions_companies(q, opts = {}) ⇒ Object
搜索公司时的联想搜索建议.
-
#suggestions_integrate(q, opts = {}) ⇒ Object
TODO:test no pass 综合联想,包含用户、微群、应用等的联想建议.
-
#suggestions_schools(q, opts = {}) ⇒ Object
搜索学校时的联想搜索建议.
-
#suggestions_statuses(q, opts = {}) ⇒ Object
搜索微博时的联想搜索建议.
-
#suggestions_users(q, opts = {}) ⇒ Object
搜索用户时的联想搜索建议.
-
#users(opts = {}) ⇒ Object
通过关键词搜索用户 [Privilege].
Methods inherited from Base
#get, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Weibo2::Interface::Base
Instance Method Details
#geo_statuses(longitude, latitude, opts = {}) ⇒ Object
获取指定地点周边的微博列表 [Privilege]
130 131 132 |
# File 'lib/weibo2/interface/search.rb', line 130 def geo_statuses(longitude, latitude, opts={}) get 'search/geo/statuses.json', :params => {:longitude => longitude, :latitude => latitude}.merge(opts) end |
#statuses(opts = {}) ⇒ Object
搜索与指定的一个或多个条件相匹配的微博 [Privilege]
113 114 115 |
# File 'lib/weibo2/interface/search.rb', line 113 def statuses(opts={}) get 'search/statuses.json', :params => opts end |
#suggestions_apps(q, opts = {}) ⇒ Object
搜索应用时的联想搜索建议
62 63 64 |
# File 'lib/weibo2/interface/search.rb', line 62 def suggestions_apps(q, opts={}) get 'search/suggestions/apps.json', :params => {:q => q}.merge(opts) end |
#suggestions_at_users(q, type, opts = {}) ⇒ Object
@用户时的联想建议
75 76 77 |
# File 'lib/weibo2/interface/search.rb', line 75 def suggestions_at_users(q, type, opts={}) get 'search/suggestions/at_users.json', :params => {:q => q, :type => type}.merge(opts) end |
#suggestions_companies(q, opts = {}) ⇒ Object
搜索公司时的联想搜索建议
51 52 53 |
# File 'lib/weibo2/interface/search.rb', line 51 def suggestions_companies(q, opts={}) get 'search/suggestions/companies.json', :params => {:q => q}.merge(opts) end |
#suggestions_integrate(q, opts = {}) ⇒ Object
TODO:test no pass 综合联想,包含用户、微群、应用等的联想建议
92 93 94 |
# File 'lib/weibo2/interface/search.rb', line 92 def suggestions_integrate(q, opts={}) get 'search/suggestions/integrate.json', :params => {:query => q}.merge(opts) end |
#suggestions_schools(q, opts = {}) ⇒ Object
搜索学校时的联想搜索建议
40 41 42 |
# File 'lib/weibo2/interface/search.rb', line 40 def suggestions_schools(q, opts={}) get 'search/suggestions/schools.json', :params => {:q => q}.merge(opts) end |
#suggestions_statuses(q, opts = {}) ⇒ Object
搜索微博时的联想搜索建议
28 29 30 |
# File 'lib/weibo2/interface/search.rb', line 28 def suggestions_statuses(q, opts={}) get 'search/suggestions/statuses.json', :params => {:q => q}.merge(opts) end |
#suggestions_users(q, opts = {}) ⇒ Object
搜索用户时的联想搜索建议
17 18 19 |
# File 'lib/weibo2/interface/search.rb', line 17 def suggestions_users(q, opts={}) get 'search/suggestions/users.json', :params => {:q => q}.merge(opts) end |
#users(opts = {}) ⇒ Object
通过关键词搜索用户 [Privilege]
152 153 154 |
# File 'lib/weibo2/interface/search.rb', line 152 def users(opts={}) get 'search/users.json', :params => opts end |