leaseweb-rest-api 1.1.1 → 1.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac512f54b172ce83fb45963e66a45cfc96389a7b
4
- data.tar.gz: 73cec703553b22fd64965ca24c8cba991b19b505
3
+ metadata.gz: a3367557a3d75e9e48b611e83de1dfd476f8aba1
4
+ data.tar.gz: 10ac30331b52b00aa9c3219648b5c46972138cf5
5
5
  SHA512:
6
- metadata.gz: 470183d2e7732fa4ebe15629a56fc07b359fc53110e4fae117e018b15e2e35a64a1a5deff4771d2e0781d019b93fccc61cc5fc54858e696e13c3d92fa7967c84
7
- data.tar.gz: 16c873c41aee0a124b4ae949e8c039a2f5374c3389c2521242f0128ed29256bef747087d182d8a8cbe8172bcd3f204665cc09befa6b0487f700373ab95c6d6d0
6
+ metadata.gz: fd89e031b50a353211b5e5b48f6d490b032d8da3937e36059a6b76d017127732afc9e152e0408cf75a867789760ad4a3b072b3c7ed89aa25b9bcfc9e792f82f4
7
+ data.tar.gz: 8173ee01c443ac43074eb45d1c8d3e7d0797a25d38e33d07ee729b4e4689a3fbab3264b7137e975e2b1d1335804cf90f825b32b3d9949c2747495f4a5c02f070
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'leaseweb-rest-api'
3
- s.version = '1.1.1'
3
+ s.version = '1.1.2'
4
4
  s.authors = 'Arnoud Vermeer'
5
5
  s.email = 'a.vermeer@tech.leaseweb.com'
6
6
  s.license = 'Apache'
@@ -18,7 +18,9 @@ class LeasewebAPI
18
18
  end
19
19
 
20
20
  def getOauthToken(clientId, clientSecret)
21
- self.class.post('https://auth.leaseweb.com/token', basic_auth: { username: clientId, password: clientSecret }, body: { grant_type: 'client_credentials' })
21
+ response = self.class.post('https://auth.leaseweb.com/token', basic_auth: { username: clientId, password: clientSecret }, body: { grant_type: 'client_credentials' })
22
+ access_token = response.parsed_response['access_token']
23
+
22
24
  @options = { headers: { 'Authorization' => "Bearer #{access_token}" } }
23
25
  end
24
26
 
@@ -34,7 +36,7 @@ class LeasewebAPI
34
36
  data = []
35
37
 
36
38
  loop do
37
- response = self.class.get(url + "&offset=#{offset}&limit=#{limit}", @options)
39
+ response = self.class.get("#{url}&offset=#{offset}&limit=#{limit}", @options)
38
40
  total = response.parsed_response['_metadata']['totalCount']
39
41
 
40
42
  data += response.parsed_response[key]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leaseweb-rest-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnoud Vermeer