daazweb-api 0.0.5 → 0.0.8
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 +4 -4
- data/lib/daazweb-api/api_request.rb +2 -1
- data/lib/daazweb-api/request.rb +3 -1
- data/lib/daazweb-api/version.rb +1 -1
- data/lib/daazweb-api.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6bc46341c3f2d8b5017c909afe12c15e1e2b475bc6103e3b85b3eb13ff2b97b
|
4
|
+
data.tar.gz: 6c4d307afa5195537bc5248a40d2bfccfe2fb3408d237744a32c596132fc5f9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f908e4d4fc9975694dc13c660e2b0a0dca93fffae0816a67d5c36debf9021fd5f2e377539b572a3502b4c0cae86f753cbd8a3e7675c7abfcda86eb4be28640a
|
7
|
+
data.tar.gz: 9c3abd81666ac49446ffbef3ddf46fcc41528a8c7310501d06fff0caa578376507ba5edbfc0f8e0a59d7c72d6dbd524a62d078a6ac97ea6b1d6680ba95799488
|
@@ -92,8 +92,9 @@ module DaazwebApi
|
|
92
92
|
def configure_request(request: nil, params: nil, headers: nil, body: nil)
|
93
93
|
if request
|
94
94
|
request.params.merge!(params) if params
|
95
|
+
request.headers = {}
|
95
96
|
request.headers['Content-Type'] = 'application/json'
|
96
|
-
request.headers['Authorization'] = "Bearer #{
|
97
|
+
request.headers['Authorization'] = "Bearer #{self.access_token}"
|
97
98
|
request.headers['User-Agent'] = "DaazwebApi/#{DaazwebApi::VERSION} Ruby gem"
|
98
99
|
request.headers.merge!(headers) if headers
|
99
100
|
request.body = MultiJson.dump(body) if body
|
data/lib/daazweb-api/request.rb
CHANGED
@@ -22,7 +22,9 @@ module DaazwebApi
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def method_missing(method, *args)
|
25
|
-
|
25
|
+
p = method.to_s.split('_').collect(&:capitalize).join
|
26
|
+
p[0] = p[0].to_s.downcase
|
27
|
+
@path_parts << p
|
26
28
|
@path_parts << args if args.length > 0
|
27
29
|
@path_parts.flatten!
|
28
30
|
self
|
data/lib/daazweb-api/version.rb
CHANGED
data/lib/daazweb-api.rb
CHANGED