Module: Checkdin::Leaderboard

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

Instance Method Summary collapse

Instance Method Details

#leaderboard(campaign_id, options = {}) ⇒ Object

Get the leaderboard for a given campaign

param [Integer] campaign_id The ID of the campaign to fetch the leaderboard for.

Parameters:

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

Options Hash (options):

  • Integer (Object)

    :limit - The maximum number of records to return.



10
11
12
13
14
15
# File 'lib/checkdin/leaderboard.rb', line 10

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