reamaze_api 0.4.0 → 0.5.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: e555a6235c5bb2d36d98fb4b6ab19fe9947d0575
4
- data.tar.gz: 4e067a44af81e4f4ff901c3c802c66506404cb15
3
+ metadata.gz: 7aaca01402e1b35bf3ca7c460046e9c5ea47a72c
4
+ data.tar.gz: d719f292bac00462d9aecd0b033db114676edea5
5
5
  SHA512:
6
- metadata.gz: ee7e1e594e3e532087ba366f69edaf8a057deef34b5ac8a3caadd6be4c6d8c2dd18584b28d5462ef4424d6b8eaaa7f102ee168e0ad139aeafb7aec77e19a3385
7
- data.tar.gz: 67174ce5cad75fa3cb818eda68dcc66d9e3bab7997b40690f1476dad9d6bad86ca9f0f775071bf10146d89ea45aae63cb5e9802953f425c5f9c5915e9bd51671
6
+ metadata.gz: 7b1f776e210c476c3bcaf9dc18d5b9fc04686b661d766d3186b76f38f0e8c3795b29fcbb09206f6d8b4adcdbc92d9a6f655c1f9959850189ee489854da275c81
7
+ data.tar.gz: 9ecabf90eda07c670f488f8cc52a13bfd887628015a6c7ea48846d9c5a655b3042bd1062ad8fc52e6b66eaec3dda4a0cd9c41d2340fe9d327a00de7157590a2f
data/README.md CHANGED
@@ -104,8 +104,10 @@ client = ReamazeAPI.new brand: "invalid"
104
104
  client.articles.all
105
105
  # {
106
106
  # :success => false,
107
- # :error => "ReamazeAPI::NotFound",
108
- # :message => "GET https://invalid.reamaze.com/api/v1/articles: 404"
107
+ # :payload => {
108
+ # :error => "ReamazeAPI::NotFound",
109
+ # :message => "GET https://invalid.reamaze.com/api/v1/articles: 404"
110
+ # }
109
111
  # }
110
112
  ```
111
113
 
@@ -13,18 +13,6 @@ module ReamazeAPI
13
13
  HashKeys.deep_symbolize_keys(hash)
14
14
  end
15
15
 
16
- # Public: Hash used for success responses.
17
- #
18
- # payload - Payload from API
19
- #
20
- # Returns a Hash.
21
- def success_hash(payload, success = true)
22
- symbolize_hash(
23
- success: success,
24
- payload: payload
25
- )
26
- end
27
-
28
16
  # Public: Hash used for error responses.
29
17
  #
30
18
  # exception - An Exception instance
@@ -33,8 +21,10 @@ module ReamazeAPI
33
21
  def error_hash(exception)
34
22
  {
35
23
  success: false,
36
- error: exception.class.name,
37
- message: exception.message
24
+ payload: {
25
+ error: exception.class.name,
26
+ message: exception.message
27
+ }
38
28
  }
39
29
  end
40
30
  end
@@ -1,3 +1,3 @@
1
1
  module ReamazeAPI
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reamaze_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Priddle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-29 00:00:00.000000000 Z
11
+ date: 2016-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday