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 CHANGED
@@ -66,4 +66,8 @@ client.widgets.my_badges(921679358)
66
66
 
67
67
  client.widgets.ubar(921679358)
68
68
 
69
+ client.widgets.list_of_leaderboards(921679373)
70
+
71
+ client.widgets.leaderboard(921679373, 226)
72
+
69
73
  ```
@@ -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)
@@ -1,3 +1,3 @@
1
1
  class UboostClient
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uboost-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: