uboost-client 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -180,6 +180,11 @@ module UboostClient
180
180
  response = @client.connection.get @url + '/profile', :sso_token => get_sso_token(account_id)
181
181
  OpenStruct.new(JSON.parse(response.body))
182
182
  end
183
+
184
+ def my_badges(account_id, badge_category_id = "all")
185
+ response = @client.connection.get @url + '/badges/mine/' + badge_category_id, :sso_token => get_sso_token(account_id)
186
+ OpenStruct.new(JSON.parse(response.body))
187
+ end
183
188
 
184
189
  def ubar(account_id, options = Hash.new)
185
190
  options = {:align => "", :bar_color => '', :div_id => ''}.merge(options)
@@ -1,3 +1,3 @@
1
1
  class UboostClient
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/spec/simple_test.rb CHANGED
@@ -6,7 +6,7 @@ api_credentials = { :username => ENV['UBOOST_USERNAME'], :password => ENV['UBOO
6
6
  client = UboostClient::Client.new(:subdomain => subdomain, :api_credentials => api_credentials)
7
7
 
8
8
  # puts client.account.create({ "user_name" => "test_user_2" })
9
- # puts client.account.select(921679358)
9
+ # puts client.account.select(921679373)
10
10
  # puts client.account.delete(921679358)
11
11
  # puts client.account.update(921679358, {:first_name => 'custom name'})
12
12
  # puts client.account.find(:user_name => 'isaacnewtonx')
@@ -15,6 +15,7 @@ client = UboostClient::Client.new(:subdomain => subdomain, :api_credentials => a
15
15
  # puts client.points.point_transactions_for_account(921679358)
16
16
  # puts client.account.points_transactions(921679358)
17
17
  # puts client.points.add_points_to_account(921679359, 30, {:description => 'whatps'})
18
- # puts client.badges.award(921679359, 1)
19
- # puts client.badges.unaward(921679359, 1)
20
- # puts client.widgets.profile(921679358)
18
+ # puts client.badges.award(921679373, 467)
19
+ # puts client.badges.unaward(921679373, 467)
20
+ # puts client.widgets.profile(921679373)
21
+ # puts client.widgets.my_badges(921679373)
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.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-29 00:00:00.000000000 Z
12
+ date: 2012-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday