cumulus_ruby 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5af02cb62dc660797bdf396064f6a52acc368a5d
4
- data.tar.gz: 1fbf4d0689353a996d4cc1b32f6321678761dc50
3
+ metadata.gz: ec14c83f6625ffedefc7c52ee7a9704a581ef0ee
4
+ data.tar.gz: fd8172525eba1b2fb38bb4ac50d4d2ec224cb990
5
5
  SHA512:
6
- metadata.gz: 7ec0090158c3e9c0517108bbe77aac7aad934dad267c5eeae122fe63f314178d4eb9a0a47908dfc2681019cd68b0b1a0213d5e8dd34fb1c81f46828a8404990f
7
- data.tar.gz: 27a4f397ee02138d24d45ccf331e8675ccdd9a10f78d44d2710bfd8557f46cc1d01a89f3bd14e44c1fc11c8289a85d7e77a840fe95e88ffed2cd6b73807f0bb6
6
+ metadata.gz: 402bfad3ec218186de092c88f5d23860cffedddd056b89e79417fcbfcf6f116581373ae5a2183c1eb9f6d173d2b557477e7d265a3abb3107f5352cd2f17ba5b5
7
+ data.tar.gz: a13a676e5bfcf3bc2a98c3a6261de1acb3a52330e1ec99c3690ba5682f676cad8f3678bf6db23f033d13546cbf8b424f54553d2a36405697b4e17034557c5ff0
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -2,20 +2,30 @@
2
2
 
3
3
  A Ruby wrapper for the Cumulus API.
4
4
 
5
+ You should access the Cumulus API documentation in order to learn more about the
6
+ request/response parameters for each endpoint.
7
+
5
8
  ## Installation
6
9
 
7
10
  ```
8
11
  $ gem install cumulus_ruby
9
12
  ```
10
13
 
14
+ Or if you are using Bundler, add
15
+
16
+ ````
17
+ gem 'cumulus_ruby'
18
+ ```
19
+
11
20
  ## API Usage Examples
12
21
 
13
22
  You will need to get an access token. Once you have it, initialize the client
14
- to make authenticated further calls.
23
+ to make authenticated calls.
15
24
 
16
25
  ```ruby
17
- # initializing the client
18
- client = Cumulus::Client.new(token: 'access-token')
26
+ require 'cumulus'
27
+
28
+ client = Cumulus::Client.new(token: '<redacted>', url: '<redacted>')
19
29
  ```
20
30
 
21
31
  ### Patients
@@ -1,15 +1,13 @@
1
1
  require 'faraday'
2
- require 'logger'
3
2
  require 'faraday_middleware'
4
3
 
5
4
  module Cumulus
6
5
  class Client
7
- attr_accessor :request
8
-
9
- API_URL = 'https://api-cumulus.com'
6
+ attr_accessor :request, :url
10
7
 
11
8
  def initialize(options={})
12
9
  @token = options[:token]
10
+ @url = options[:url]
13
11
  end
14
12
 
15
13
  def request(type, path, params={})
@@ -51,8 +49,12 @@ module Cumulus
51
49
  @token
52
50
  end
53
51
 
52
+ def url
53
+ @url
54
+ end
55
+
54
56
  def connection
55
- @connection ||= Faraday.new(url: Cumulus::Client::API_URL) do |b|
57
+ @connection ||= Faraday.new(url: url) do |b|
56
58
  b.adapter Faraday.default_adapter
57
59
  b.use FaradayMiddleware::ParseJson
58
60
  end
@@ -1,3 +1,3 @@
1
1
  module Cumulus
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cumulus_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amed Rodriguez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-31 00:00:00.000000000 Z
11
+ date: 2016-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler