Module: Yammer::Api::Activity

Included in:
Client
Defined in:
lib/yammer/api/activity.rb

Instance Method Summary collapse

Instance Method Details

#create_activity(opts = {}) ⇒ Yammer::ApiResponse

Examples:

Create a new public group

Yammer.create_activity(
  activity: {
     actor: {
     name: 'John Doe',
     email: '[email protected]'
     },
   action: 'create',
     object: {
       url: 'www.example.com',
       title: 'Example name',
     }
   },
   message: 'Posting activity',
   users: [{
     name: 'Example Invitee',
     email: '[email protected]'
   }]
 }

Parameters:

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

    the opts to post the activity with

  • actor (Hash)

    a customizable set of options

  • object (Hash)

    a customizable set of options

  • users (Hash)

    a customizable set of options

Options Hash (opts):

  • actor (Hash)

    The user performing the action

  • object (Hash)

    The object on which the action is being performed

  • :action (String)
  • :users (Array<Hash>)
  • :private (Boolean)
  • :message (String)

Returns:

Raises:

See Also:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



56
57
58
# File 'lib/yammer/api/activity.rb', line 56

def create_activity(opts = {})
  post('/api/v1/activity', opts)
end