checkdin 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,27 @@
1
1
  module Checkdin
2
2
  module Leaderboard
3
3
 
4
- # Get the leaderboard for a given campaign
4
+ # Get the leading point accounts for non-campaign-specific points.
5
5
  #
6
- # param [Integer] campaign_id The ID of the campaign to fetch the leaderboard for.
7
6
  # @param [Hash] options
8
7
  # @option options Integer :limit - The maximum number of records to return.
9
8
 
10
- def leaderboard(campaign_id, options={})
9
+ def leaderboard(options={})
10
+ response = connection.get do |req|
11
+ req.url "clients/leaderboard", options
12
+ end
13
+ return_error_or_body(response)
14
+ end
15
+
16
+ # Get the leading point accounts for a single campaign'sc specific points.
17
+ #
18
+ # param [Integer] campaign_id The ID of the campaign to fetch the leaderboard for.
19
+ # @param [Hash] options
20
+ # @option options Integer :limit - The maximum number of records to return.
21
+
22
+ def campaign_leaderboard(campaign_id, options={})
11
23
  response = connection.get do |req|
12
- req.url "campaigns/#{campaign_id}/leaderboard", options
24
+ req.url "campaigns/#{campaign_id}/leaderboard"
13
25
  end
14
26
  return_error_or_body(response)
15
27
  end
@@ -135,5 +135,24 @@ module Checkdin
135
135
  return_error_or_body(response)
136
136
  end
137
137
 
138
+ # View a full user's description
139
+ #
140
+ # param [Integer] id The ID of the user
141
+
142
+ def view_user_full_description(id)
143
+ response = connection.get do |req|
144
+ req.url "users/#{id}/full"
145
+ end
146
+ return_error_or_body(response)
147
+ end
148
+
149
+ # Get a list of a user's point accounts
150
+ #
151
+ # param [Integer] id the ID of the user
152
+
153
+ def user_point_accounts(id)
154
+ response = connection.get("users/#{id}/point_accounts")
155
+ return_error_or_body(response)
156
+ end
138
157
  end
139
158
  end
@@ -1,3 +1,3 @@
1
1
  module Checkdin
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkdin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: