Module: Yammer::Client::Search

Included in:
Yammer::Client
Defined in:
lib/yammer/client/search.rb

Overview

Defines methods related to search

Instance Method Summary collapse

Instance Method Details

#search(query, options = {}) ⇒ Hashie::Mash

Returns the 20 lists of messages, users, tags and groups that match the user's search query.

Examples:

Yammer.search("my boss")

Parameters:

  • query (String)

    The search query.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :page (Integer)

    Only 20 results of each type will be returned for each page, but a total count is returned with each query. page=1 (the default) will return items 1-20, page=2 will return items 21-30, etc.

  • :num_per_page (Integer)

    limit of search results, up to a maximum of 20, the default value.

Returns:

  • (Hashie::Mash)

See Also:

Supported formats:

  • :json

Requires Authentication:

  • true

Rate Limited:




18
19
20
# File 'lib/yammer/client/search.rb', line 18

def search(query, options={})
  get('search', options.merge({:search => query}))
end