module Croudia::API::Search
Public Instance Methods
Search
for statuses
@see developer.croudia.com/docs/81_search @overload search(q, params={})
@param [String] q Search query @param [Hash] params Additional query parameters @option params [String, Integer] :count Number of statuses in the response @option params [String] :include_entities Set false to exclude entities @option params [String, Integer] :max_id Paging parameter @option params [String, Integer] :since_id Paging parameter @option params [String] :trim_user Set true to return compact user objects
@overload search(params={})
@param [Hash] params Query parameters @option params [String] :q Search query @option params [String, Integer] :count Number of statuses in the response @option params [String] :include_entities Set false to exclude entities @option params [String, Integer] :max_id Paging parameter @option params [String, Integer] :since_id Paging parameter @option params [String] :trim_user Set true to return compact user objects
@return [Croudia::SearchResults]
# 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
for statuses the authenticated user has favorited
@see developer.croudia.com/docs/84_search_favorites @overload search_favorites
(q, params={})
@param [String] q Search query @param [Hash] params Additional query parameters @option params [String, Integer] :count Number of statuses in the response @option params [String] :include_entities Set false to exclude entities @option params [String, Integer] :max_id Paging parameter @option params [String, Integer] :since_id Paging parameter @option params [String] :trim_user Set true to return compact user objects
@overload search_favorites
(params={})
@param [Hash] params Query parameters @option params [String] :q Search query @option params [String, Integer] :count Number of statuses in the response @option params [String] :include_entities Set false to exclude entities @option params [String, Integer] :max_id Paging parameter @option params [String, Integer] :since_id Paging parameter @option params [String] :trim_user Set true to return compact user objects
@return [Croudia::SearchResults]
# 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
for users
@see developer.croudia.com/docs/82_users_search @overload search_user
(q, params={})
@param [String] q Search query @param [Hash] params Additional query parameters @option params [String, Integer] :count Number of users in the response @option params [String] :include_entities Set false to exclude entities @option params [String, Integer] :max_id Paging parameter @option params [String, Integer] :since_id Paging parameter @option params [String] :trim_user Set true to return compact user objects
@overload search_user
(params={})
@param [Hash] params Query parameters @option params [String] :q Search query @option params [String, Integer] :count Number of users in the response @option params [String, Integer] :page Page to fetch, up to 1000 @option params [String] :trim_user Set true to return compact user objects
@return [Array<Croudia::User>] Users
found
# 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
for users with profile
@see developer.croudia.com/docs/83_profile_search @overload search_user_by_profile
(q, params={})
@param [String] q Search query @param [Hash] params Additional query parameters @option params [String, Integer] :count Number of users in the response @option params [String] :include_entities Set false to exclude entities @option params [String] :trim_user Set true to return compact user objects
@overload search_user_by_profile
(params={})
@param [Hash] params Query parameters @option params [String] :q Search query @option params [String, Integer] :count Number of users in the response @option params [String, Integer] :page Page to fetch, up to 1000 @option params [String] :trim_user Set true to return compact user objects
@return [Array<Croudia::User>] Users
found
# 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