wes-data-api 6.2.0 → 7.0.0

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: 502ea4512a30200c3d773d34ca3c7db769b61e48
4
- data.tar.gz: 72810c0e7e76ef94bf03640b7077fea2c44e24e4
3
+ metadata.gz: 31b8615dcefa088ac76fc1cc49d39694847717cd
4
+ data.tar.gz: 34fc55122d7030b1085dc50b2b29abd786dca59a
5
5
  SHA512:
6
- metadata.gz: f52cb8801ac36105e978471d36db316b30990e840c68a27a4b02d137c02b617ce13b9874673421ffff6df31248bd5b9b0949dfae568795a60687f44b8a43a5b9
7
- data.tar.gz: fa7e6eaa280153ab50998c1a6af14b63c83139f93f4fdcc2f74acabf3c6a8277853cf6dec0538251207923d8d4cd3be6fc4206f9a0f1445b89fe7d3872af1e29
6
+ metadata.gz: ede67f67f12fc0f7c46fd8d237284ba153a0018ec47d797a749c837ab56b24d84138d004820a68297fde4d0668a4b1f76a4b0a2bdd0ac2a38efc81ade017ad91
7
+ data.tar.gz: 71d40e3b622d38b15d9d28b25ef4db7ceb3bbb3321ac37bf828b4d9c72da5729715e2f592dac94024394c968bab1e420736f91b5d7a0a7add0523a31bded224b
data/lib/wes/data/api.rb CHANGED
@@ -5,7 +5,7 @@ require "wes/data/api/configuration"
5
5
  module Wes
6
6
  module Data
7
7
  module API
8
- VERSION = "6.2.0".freeze
8
+ VERSION = "7.0.0".freeze
9
9
  end
10
10
  end
11
11
  end
@@ -9,8 +9,9 @@ module Wes
9
9
  class << self
10
10
  def get(path)
11
11
  connection.get do |r|
12
- r.options.timeout = TIMEOUT
13
- r.url complete_path(path)
12
+ r.options.timeout = TIMEOUT
13
+ r.headers["Content-Type"] = "application/json"
14
+ r.url complete_path(path)
14
15
  end
15
16
  end
16
17
 
@@ -34,8 +35,9 @@ module Wes
34
35
 
35
36
  def delete(path)
36
37
  connection.delete do |r|
37
- r.options.timeout = TIMEOUT
38
- r.url complete_path(path)
38
+ r.options.timeout = TIMEOUT
39
+ r.headers["Content-Type"] = "application/json"
40
+ r.url complete_path(path)
39
41
  end
40
42
  end
41
43
 
@@ -18,7 +18,7 @@ module Wes
18
18
 
19
19
  private
20
20
 
21
- VALID_RESPONSE_CODES = [200, 204]
21
+ VALID_RESPONSE_CODES = [200, 204].freeze
22
22
 
23
23
  attr_reader :response
24
24
 
@@ -27,15 +27,11 @@ module Wes
27
27
  end
28
28
 
29
29
  def error_details
30
- response.body.fetch("details")
31
- end
32
-
33
- def error_status
34
- response.body.fetch("status")
30
+ response.body.fetch("Error")
35
31
  end
36
32
 
37
33
  def api_error
38
- Error::Response.new(error_status, error_details)
34
+ Error::Response.new(500, error_details)
39
35
  end
40
36
 
41
37
  def unexpected_error
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wes-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''