Module: Yammer::Client::Groups

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

Overview

Defines methods related to groups

Instance Method Summary collapse

Instance Method Details

#create_group(name, options = {}) ⇒ Object

Create/Update group.

Parameters:

  • name (String)

    The name of group.

  • private (String)

    Used true when creating or updating groups to make them private.

Requires Authentication:

  • true

Rate Limited:

  • unconfirmed



39
40
41
# File 'lib/yammer/client/groups.rb', line 39

def create_group(name, options={})
  post('groups', options.merge({:name => name}))
end

#group(id, options = {}) ⇒ Hashie::Mash

Get specific group information.

Parameters:

  • id (Integer)

    The id of specific group.

Returns:

  • (Hashie::Mash)

    Informations of group which id is #id.

Supported formats:

  • :json

Requires Authentication:

  • true

Rate Limited:

  • unconfirmed



29
30
31
# File 'lib/yammer/client/groups.rb', line 29

def group(id, options={})
  get("groups/#{id}", options)
end

#groups(options = {}) ⇒ Hashie::Mash

Get groups information.

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • :page (Integer)

    20 groups will be shown per page.

  • :letter (String)

    Return groups beginning with the given letter.

  • :sort_by (messages|members|privacy|created_at|creator)

    Results will be returned sorted by one of the above options instead of the default behavior of sorting by number of messages.

  • :reverse (String)

    Return results in reverse order if uses true.

  • :private (String)

    Used when creating or updating groups to make them private if uses true.

Returns:

  • (Hashie::Mash)

    Informations of groups.

See Also:

Supported formats:

  • :json

Requires Authentication:

  • true

Rate Limited:

  • unconfirmed



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

def groups(options={})
  get("groups", options)
end