Module: Croudia::API::Search
- Included in:
- Client
- Defined in:
- lib/croudia/api/search.rb
Instance Method Summary collapse
-
#search(q, params = {}) ⇒ Croudia::SearchResults
Search for statuses.
-
#search_favorites(q, params = {}) ⇒ Croudia::SearchResults
Search for statuses the authenticated user has favorited.
-
#search_user(q, params = {}) ⇒ Array<Croudia::User>
(also: #search_users)
Search for users.
-
#search_user_by_profile(q, params = {}) ⇒ Array<Croudia::User>
(also: #search_users_by_profile)
Search for users with profile.
Instance Method Details
#search(q, params = {}) ⇒ Croudia::SearchResults #search(params = {}) ⇒ Croudia::SearchResults
Search for statuses
27 28 29 30 31 |
# File 'lib/croudia/api/search.rb', line 27 def search(q, params={}) merge_query!(params, q) resp = get('/search/voices.json', params) Croudia::SearchResults.new(resp) end |
#search_favorites(q, params = {}) ⇒ Croudia::SearchResults #search_favorites(params = {}) ⇒ Croudia::SearchResults
Search for statuses the authenticated user has favorited
101 102 103 104 105 |
# File 'lib/croudia/api/search.rb', line 101 def search_favorites(q, params={}) merge_query!(params, q) resp = get('/search/favorites.json', params) Croudia::SearchResults.new(resp) end |
#search_user(q, params = {}) ⇒ Array<Croudia::User> #search_user(params = {}) ⇒ Array<Croudia::User> Also known as: search_users
Search for users
51 52 53 54 55 |
# File 'lib/croudia/api/search.rb', line 51 def search_user(q, params={}) merge_query!(params, q) resp = get('/users/search.json', params) objects(Croudia::User, resp) end |
#search_user_by_profile(q, params = {}) ⇒ Array<Croudia::User> #search_user_by_profile(params = {}) ⇒ Array<Croudia::User> Also known as: search_users_by_profile
Search for users with profile
74 75 76 77 78 |
# File 'lib/croudia/api/search.rb', line 74 def search_user_by_profile(q, params={}) merge_query!(params, q) resp = get('/profile/search.json', params) objects(Croudia::User, resp) end |