Module: Checkdin::CustomActivities

Included in:
Client
Defined in:
lib/checkdin/custom_activities.rb

Instance Method Summary collapse

Instance Method Details

#create_custom_activity(options = {}) ⇒ Object

Notify checkd.in of a custom activity ocurring

Parameters:

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

Options Hash (options):

  • Integer (Object)

    :custom_activity_node_id - The ID of the custom activity node that has ocurred, available in checkd.in admin. Required.

  • Integer (Object)

    :user_id - The ID of the user that has performed the custom activity - either this or email is required.

  • String (Object)

    :email - The email address of the user that has performed the custom activity - either this or user_id is required.



11
12
13
14
15
16
# File 'lib/checkdin/custom_activities.rb', line 11

def create_custom_activity(options={})
  response = connection.post do |req|
    req.url "custom_activities", options
  end
  return_error_or_body(response)
end