uboost-client 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +4 -0
- data/lib/uboost-client/uboost_client.rb +10 -0
- data/lib/uboost-client/version.rb +1 -1
- data/spec/simple_test.rb +4 -0
- metadata +1 -1
data/README.markdown
CHANGED
@@ -185,6 +185,16 @@ module UboostClient
|
|
185
185
|
response = @client.connection.get @url + '/badges/mine/' + badge_category_id, :sso_token => get_sso_token(account_id)
|
186
186
|
OpenStruct.new(JSON.parse(response.body))
|
187
187
|
end
|
188
|
+
|
189
|
+
def list_of_leaderboards(account_id)
|
190
|
+
response = @client.connection.get @url + '/leaderboards', :sso_token => get_sso_token(account_id)
|
191
|
+
OpenStruct.new(JSON.parse(response.body))
|
192
|
+
end
|
193
|
+
|
194
|
+
def leaderboard(account_id, leaderboard_id)
|
195
|
+
response = @client.connection.get @url + '/leaderboards/' + leaderboard_id.to_s, :sso_token => get_sso_token(account_id)
|
196
|
+
OpenStruct.new(JSON.parse(response.body))
|
197
|
+
end
|
188
198
|
|
189
199
|
def ubar(account_id, options = Hash.new)
|
190
200
|
options = {:align => "", :bar_color => '', :div_id => ''}.merge(options)
|
data/spec/simple_test.rb
CHANGED
@@ -20,3 +20,7 @@ client = UboostClient::Client.new(:subdomain => subdomain, :api_credentials => a
|
|
20
20
|
# puts client.widgets.profile(921679373)
|
21
21
|
# puts client.widgets.my_badges(921679373)
|
22
22
|
# puts client.widgets.ubar(921679373)
|
23
|
+
# puts client.widgets.list_of_leaderboards(921679373)
|
24
|
+
puts client.widgets.leaderboard(921679373, 226)
|
25
|
+
puts client.widgets.leaderboard(921679373, 227)
|
26
|
+
puts client.widgets.leaderboard(921679373, 228)
|