uboost-client 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -17,10 +17,16 @@ client = UboostClient::Client.new(:subdomain => 'test_subdomain', :api_credentia
17
17
  {:username => 'api_username', password => 'api_password'})
18
18
 
19
19
  # Examples
20
+ #
21
+ # All commands return a OpenStruct. Its structure correlates to the
22
+ # JSON that is returned from uBoost API.
20
23
 
21
24
  client.account.create({ "user_name" => "test_user_2" })
22
25
  =>
23
- #<OpenStruct student={"id"=>921679358, "external_id"=>nil, "catalog_id"=>109, "site_id"=>98, "user_name"=>"test_user_2", "encrypted_password"=>"kabyle00", "points"=>0, "points_accumulated"=>0, ...}
26
+ <OpenStruct student={"id"=>921679358,
27
+ "external_id"=>nil,
28
+ "catalog_id"=>109,
29
+ "points"=>0, ...}
24
30
 
25
31
  client.account.select(921679358)
26
32
 
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ task 'build' do
8
8
  end
9
9
 
10
10
  desc "Publish gem"
11
- task "release" do
11
+ task "publish" do
12
12
  system("gem push uboost-client-#{UboostClient::VERSION}.gem")
13
13
  end
14
14
 
@@ -102,10 +102,10 @@ module UboostClient
102
102
 
103
103
  class Points
104
104
 
105
- attr_accessor :connection, :url
105
+ attr_accessor :client, :url
106
106
 
107
107
  def initialize(client)
108
- client.connection = client
108
+ @client = client
109
109
  @url = '/api/points_transactions'
110
110
  end
111
111
 
@@ -1,3 +1,3 @@
1
1
  class UboostClient
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
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).inspect
9
+ # puts client.account.select(921679358)
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')
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
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: