uboost-client 0.1 → 0.1.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.
- data/README.markdown +7 -1
- data/Rakefile +1 -1
- data/lib/uboost-client/uboost_client.rb +2 -2
- data/lib/uboost-client/version.rb +1 -1
- data/spec/simple_test.rb +1 -1
- metadata +1 -1
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
|
-
|
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
@@ -102,10 +102,10 @@ module UboostClient
|
|
102
102
|
|
103
103
|
class Points
|
104
104
|
|
105
|
-
attr_accessor :
|
105
|
+
attr_accessor :client, :url
|
106
106
|
|
107
107
|
def initialize(client)
|
108
|
-
client
|
108
|
+
@client = client
|
109
109
|
@url = '/api/points_transactions'
|
110
110
|
end
|
111
111
|
|
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(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')
|