unleashed 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +1 -0
- data/CODE_OF_CONDUCT.md +1 -0
- data/Gemfile +1 -0
- data/LICENSE +1 -0
- data/LICENSE.txt +1 -0
- data/README.md +51 -5
- data/Rakefile +1 -0
- data/bin/.keep +0 -0
- data/lib/.keep +0 -0
- data/lib/unleashed/version.rb +1 -1
- data/unleashed.gemspec +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8cf451e716eaf53fdd1c508701a506625f9d10f62a26cb7298e8b32a9832dc0
|
4
|
+
data.tar.gz: ed27ce803188bbaf52c87161d5adff85a9706a7f96d836e688199b1e622d88b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce74137ff724c846b635cc790f0031143ceb8dbc40cccff2e2e8b5db1bbcf5ff8d6401063130022583a8e69c2feccbb6894471339e6d7857973754103c6bceb8
|
7
|
+
data.tar.gz: c23906fd924b35d65cca03a2df50cc88a09a8503a6708b16b379b9a238b92e88824042fa86b503c248de1005079f1ef86f03fe5de73987837bbfbfde08df26fe
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.ruby-version
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/CODE_OF_CONDUCT.md
CHANGED
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -18,11 +18,57 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
$ gem install unleashed
|
20
20
|
|
21
|
-
## 2.
|
21
|
+
## 2. Configuration
|
22
22
|
|
23
|
-
|
23
|
+
Before interacting with Unleashed API you need to sign up an account.
|
24
24
|
|
25
|
-
|
25
|
+
See [Unleashed API Documentation](https://apidocs.unleashedsoftware.com/) for more information.
|
26
|
+
|
27
|
+
### Create a Unleashed client
|
28
|
+
|
29
|
+
The client can be configured through environment variables.
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
# In your environment file
|
33
|
+
# Default
|
34
|
+
UNLEASHED_API_DOMAIN = api.unleashedsoftware.com
|
35
|
+
UNLEASHED_CLIENT_TYPE_HEADER = API-Sandbox
|
36
|
+
|
37
|
+
UNLEASHED_API_ID = yourapiid
|
38
|
+
UNLEASHED_API_KEY = yourapikey
|
39
|
+
```
|
40
|
+
|
41
|
+
The following parameters are configurable through the client:
|
42
|
+
|
43
|
+
* `:api_domain` / `ENV['UNLEASHED_API_DOMAIN']`: API domain name to use (default: 'api.unleashedsoftware.com')
|
44
|
+
* `:api_id` / `ENV['UNLEASHED_API_ID']`: API ID
|
45
|
+
* `:api_key` / `ENV['UNLEASHED_API_KEY']`: API KEY
|
46
|
+
* `:client_type_header` / `ENV['UNLEASHED_CLIENT_TYPE_HEADER']`: Client Type Header to use (default: 'API-Sandbox')
|
47
|
+
|
48
|
+
## 3. Usage
|
49
|
+
|
50
|
+
### Instantiate the Unleashed client
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
options = { api_id: ENV['UNLEASHED_API_ID'], api_key: ENV['UNLEASHED_API_KEY'] }
|
54
|
+
client = Unleashed::Client.new(options)
|
55
|
+
```
|
56
|
+
|
57
|
+
### Customers
|
58
|
+
|
59
|
+
#### Get all customers
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
client.customers.all
|
63
|
+
```
|
64
|
+
|
65
|
+
#### Get a customer
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
client.customers.find('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX')
|
69
|
+
```
|
70
|
+
|
71
|
+
## 4. Contributing
|
26
72
|
|
27
73
|
1. Fork it [https://github.com/nnhansg/unleashed-ruby](https://github.com/nnhansg/unleashed-ruby)
|
28
74
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
@@ -30,10 +76,10 @@ TODO: Write usage instructions here
|
|
30
76
|
4. Push to the branch (`git push origin my-new-feature`)
|
31
77
|
5. Create a new Pull Request
|
32
78
|
|
33
|
-
##
|
79
|
+
## 5. License
|
34
80
|
|
35
81
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
36
82
|
|
37
|
-
##
|
83
|
+
## 6. Code of Conduct
|
38
84
|
|
39
85
|
Everyone interacting in the Unleashed project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/nnhansg/unleashed-ruby/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
data/bin/.keep
ADDED
File without changes
|
data/lib/.keep
ADDED
File without changes
|
data/lib/unleashed/version.rb
CHANGED
data/unleashed.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unleashed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nhan Nguyen
|
@@ -104,8 +104,10 @@ files:
|
|
104
104
|
- LICENSE.txt
|
105
105
|
- README.md
|
106
106
|
- Rakefile
|
107
|
+
- bin/.keep
|
107
108
|
- bin/console
|
108
109
|
- bin/setup
|
110
|
+
- lib/.keep
|
109
111
|
- lib/unleashed.rb
|
110
112
|
- lib/unleashed/client.rb
|
111
113
|
- lib/unleashed/configurable.rb
|