wes-data-api 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wes/data/api/client.rb +5 -0
- data/lib/wes/data/api/request.rb +13 -0
- data/lib/wes/data/api/user.rb +1 -1
- data/lib/wes/data/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf54b7a106c5f130ac21a1580bf48f9cb7f89ceb
|
4
|
+
data.tar.gz: e47f74772605faa8388618f9003a84469ec51095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9b6f557badb75ae2cd03c95c7db9eab800be42e7efdd8beb77a645f3df9c6123719fb6481e76ac8f77f66b5928096fe4c16dea0d1ad9d592ccf9e393b448e68
|
7
|
+
data.tar.gz: d13d4b04fc0a8de911c1b44a246198bbdfbcaacd8b323377aac2e82777df79f242e5f3e2731b5b8b745df8281bd6dc915b4131a4f0e93da20302d56ae65b6a1c
|
data/lib/wes/data/api/client.rb
CHANGED
data/lib/wes/data/api/request.rb
CHANGED
@@ -14,6 +14,10 @@ module Wes
|
|
14
14
|
new.post(path, options)
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.put(path, options = {})
|
18
|
+
new.put(path, options)
|
19
|
+
end
|
20
|
+
|
17
21
|
def get(path)
|
18
22
|
connection.get do |r|
|
19
23
|
r.url complete_path(path)
|
@@ -30,6 +34,15 @@ module Wes
|
|
30
34
|
end
|
31
35
|
end
|
32
36
|
|
37
|
+
def put(path, options)
|
38
|
+
connection.put do |r|
|
39
|
+
r.body = options.to_json
|
40
|
+
r.headers["Content-Type"] = "application/json"
|
41
|
+
r.url complete_path(path)
|
42
|
+
r.options.timeout = TIMEOUT
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
33
46
|
private
|
34
47
|
|
35
48
|
TIMEOUT = 2
|
data/lib/wes/data/api/user.rb
CHANGED
data/lib/wes/data/api/version.rb
CHANGED