Module: Checkdin::Leaderboard
- Included in:
- Client
- Defined in:
- lib/checkdin/leaderboard.rb
Instance Method Summary collapse
-
#campaign_leaderboard(campaign_id, options = {}) ⇒ Object
Get the leading point accounts for a single campaign’sc specific points.
-
#classification_leaderboard(campaign_id) ⇒ Object
Get the classification leaderboard for a given campaign.
-
#leaderboard(options = {}) ⇒ Object
Get the leading point accounts for non-campaign-specific points.
Instance Method Details
#campaign_leaderboard(campaign_id, options = {}) ⇒ Object
Get the leading point accounts for a single campaign’sc specific points.
param [Integer] campaign_id The ID of the campaign to fetch the leaderboard for.
22 23 24 25 26 27 |
# File 'lib/checkdin/leaderboard.rb', line 22 def campaign_leaderboard(campaign_id, ={}) response = connection.get do |req| req.url "campaigns/#{campaign_id}/leaderboard" end return_error_or_body(response) end |
#classification_leaderboard(campaign_id) ⇒ Object
Get the classification leaderboard for a given campaign
param [Integer] campaign_id The ID of the campaign to fetch the leaderboard for.
33 34 35 36 37 38 |
# File 'lib/checkdin/leaderboard.rb', line 33 def classification_leaderboard(campaign_id) response = connection.get do |req| req.url "campaigns/#{campaign_id}/classification_leaderboard" end return_error_or_body(response) end |
#leaderboard(options = {}) ⇒ Object
Get the leading point accounts for non-campaign-specific points.
9 10 11 12 13 14 |
# File 'lib/checkdin/leaderboard.rb', line 9 def leaderboard(={}) response = connection.get do |req| req.url "clients/leaderboard", end return_error_or_body(response) end |