Module: Checkdin::Campaigns

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

Instance Method Summary collapse

Instance Method Details

#campaign(id) ⇒ Object

Retrieve information about a campaign

param [Integer] id The ID of the campaign



8
9
10
11
# File 'lib/checkdin/campaigns.rb', line 8

def campaign(id)
  response = connection.get("campaigns/#{id}")
  return_error_or_body(response)
end

#campaigns(options = {}) ⇒ Object

Get a list of all campaigns for the authenticating client.

Parameters:

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

Options Hash (options):

  • Integer (Object)

    :limit - The maximum number of records to return.



18
19
20
21
22
23
# File 'lib/checkdin/campaigns.rb', line 18

def campaigns(options={})
   response = connection.get do |req|
   	req.url "campaigns", options
   end
   return_error_or_body(response)
end