zeus_sdk 0.6.9 → 0.7.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
  SHA256:
3
- metadata.gz: f451f89cbdde67d0641d344bbc27a9fe366e517d4c3019a2b5720b5e2e79d6ca
4
- data.tar.gz: c4939258ccedef6f9035ce3ab5c7f2f037cf164b8e747fcc1005d127d5a9cf9b
3
+ metadata.gz: dec696694bb7ef88f52a6344a6bb3a191575599dcdfabdaa0f64c2d37bd3452b
4
+ data.tar.gz: ac6bb736937fea7ba3a30f1c4f9e625dad528434d664728cced304658ab447ac
5
5
  SHA512:
6
- metadata.gz: 5330369c05049503de331f07b59074a2eda8b365d6b7d13542ae23ea98722deba6860a7d02ae1bfb518af6f8da9aa3f9562890c2f4b6b415ccb7bfaac6b2947a
7
- data.tar.gz: 51edfb2a23501d0c2169058aa5d877b78bbcfa0f199fe21b3ddfe23f7ba256c2351018b1928c590dc5410a262183989bb19ed57e4c841007718666aa3a3be372
6
+ metadata.gz: 6705ccd773673ccbeb2f57ba11367d0bd5a26e631f2e3072a6fdb76df6f7cf1aafe14f0df2b6df9035ea3dd7e3416c1d4e11d33a8998a29071ef9f2683d7fecb
7
+ data.tar.gz: 40d4e4fdde7226f92c07aa9142c17ee28c89495166ad31d77bc966aeca94eb0225aed2eefabc17f54acfb4da8bc7e96fc1ef386518f715bccb39caea8e05f685
@@ -10,34 +10,34 @@ module ZeusSdk::V1
10
10
 
11
11
  def list_images(query)
12
12
  resp = self.class.get("/api/v1/images", query: query, headers: self.get_headers).parsed_response
13
- return ApiResponse.new(resp)
13
+ return resp
14
14
  end
15
15
 
16
16
  def create_image(image)
17
17
  body = {image: image}
18
18
  resp = self.class.post("/api/v1/images", body: body.to_json, headers: self.get_headers).parsed_response
19
- return ApiResponse.new(resp)
19
+ return resp
20
20
  end
21
21
 
22
22
  def get_image(id)
23
23
  resp = self.class.get("/api/v1/images/#{id}", headers: self.get_headers).parsed_response
24
- return ApiResponse.new(resp)
24
+ return resp
25
25
  end
26
26
 
27
27
  def get_image_variants(id)
28
28
  resp = self.class.get("/api/v1/images/#{id}/variants", headers: self.get_headers).parsed_response
29
- return ApiResponse.new(resp)
29
+ return resp
30
30
  end
31
31
 
32
32
  def update_image(id, image)
33
33
  body = {image: image}
34
34
  resp = self.class.put("/api/v1/images/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
35
- return ApiResponse.new(resp)
35
+ return resp
36
36
  end
37
37
 
38
38
  def destroy_image(id)
39
39
  resp = self.class.delete("/api/v1/images/#{id}", headers: self.get_headers).parsed_response
40
- return ApiResponse.new(resp)
40
+ return resp
41
41
  end
42
42
  end
43
43
  end
@@ -12,53 +12,53 @@ module ZeusSdk::V1
12
12
  def list_users(query)
13
13
  resp = self.class.get("/api/v1/users", query: query, headers: self.get_headers).parsed_response
14
14
 
15
- return ApiResponse.new(resp)
15
+ return resp
16
16
  end
17
17
 
18
18
  def login_with_email_password(session)
19
19
  body = {user: user}
20
20
  resp = self.class.post("/api/v1/sessions", body: body.to_json, headers: self.get_headers).parsed_response
21
21
 
22
- return ApiResponse.new(resp)
22
+ return resp
23
23
  end
24
24
 
25
25
  def signup_with_email_password(user)
26
26
  body = {user: user}
27
27
  resp = self.class.post("/api/v1/users", body: body.to_json, headers: self.get_headers).parsed_response
28
28
 
29
- return ApiResponse.new(resp)
29
+ return resp
30
30
  end
31
31
 
32
32
  def get_users(query)
33
33
  resp = self.class.get("/api/v1/users", query: query, headers: self.get_headers).parsed_response
34
34
 
35
- return ApiResponse.new(resp)
35
+ return resp
36
36
  end
37
37
 
38
38
  def get_user(id)
39
39
  resp = self.class.get("/api/v1/users/#{id}", headers: self.get_headers).parsed_response
40
40
 
41
- return ApiResponse.new(resp)
41
+ return resp
42
42
  end
43
43
 
44
44
  def create_user(attributes)
45
45
  body = {user: attributes}
46
46
  resp = self.class.post("/api/v1/users", body: body.to_json, headers: self.get_headers).parsed_response
47
47
 
48
- return ApiResponse.new(resp)
48
+ return resp
49
49
  end
50
50
 
51
51
  def update_user(id, attributes)
52
52
  body = {user: attributes}
53
53
  resp = self.class.put("/api/v1/users/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
54
54
 
55
- return ApiResponse.new(resp)
55
+ return resp
56
56
  end
57
57
 
58
58
  def destroy_user(id)
59
59
  resp = self.class.delete("/api/v1/users/#{id}", headers: self.get_headers).parsed_response
60
60
 
61
- return ApiResponse.new(resp)
61
+ return resp
62
62
  end
63
63
 
64
64
 
@@ -66,33 +66,33 @@ module ZeusSdk::V1
66
66
  def get_waiting_lists(query)
67
67
  resp = self.class.get("/api/v1/waiting_lists", query: query, headers: self.get_headers).parsed_response
68
68
 
69
- return ApiResponse.new(resp)
69
+ return resp
70
70
  end
71
71
 
72
72
  def get_waiting_list(id)
73
73
  resp = self.class.get("/api/v1/waiting_lists/#{id}", headers: self.get_headers).parsed_response
74
74
 
75
- return ApiResponse.new(resp)
75
+ return resp
76
76
  end
77
77
 
78
78
  def create_waiting_list(waiting_list)
79
79
  body = {waiting_list: waiting_list}
80
80
  resp = self.class.post("/api/v1/waiting_lists/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
81
81
 
82
- return ApiResponse.new(resp)
82
+ return resp
83
83
  end
84
84
 
85
85
  def update_waiting_list(id, attributes)
86
86
  body = {waiting_list: attributes}
87
87
  resp = self.class.put("/api/v1/waiting_lists/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
88
88
 
89
- return ApiResponse.new(resp)
89
+ return resp
90
90
  end
91
91
 
92
92
  def destroy_waiting_list(id)
93
93
  resp = self.class.delete("/api/v1/waiting_lists/#{id}", headers: self.get_headers).parsed_response
94
94
 
95
- return ApiResponse.new(resp)
95
+ return resp
96
96
  end
97
97
 
98
98
 
@@ -100,33 +100,33 @@ module ZeusSdk::V1
100
100
  def get_waiting_list_emails(query)
101
101
  resp = self.class.get("/api/v1/waiting_list_emails", query: query, headers: self.get_headers).parsed_response
102
102
 
103
- return ApiResponse.new(resp)
103
+ return resp
104
104
  end
105
105
 
106
106
  def get_waiting_list_email(id)
107
107
  resp = self.class.get("/api/v1/waiting_list_emails/#{id}", headers: self.get_headers).parsed_response
108
108
 
109
- return ApiResponse.new(resp)
109
+ return resp
110
110
  end
111
111
 
112
112
  def create_waiting_list_email(waiting_list_email)
113
113
  body = {waiting_list_email: waiting_list_email}
114
114
  resp = self.class.post("/api/v1/waiting_list_emails/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
115
115
 
116
- return ApiResponse.new(resp)
116
+ return resp
117
117
  end
118
118
 
119
119
  def update_waiting_list_email(id, attributes)
120
120
  body = {waiting_list_email: attributes}
121
121
  resp = self.class.put("/api/v1/waiting_list_emails/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
122
122
 
123
- return ApiResponse.new(resp)
123
+ return resp
124
124
  end
125
125
 
126
126
  def destroy_waiting_list_email(id)
127
127
  resp = self.class.delete("/api/v1/waiting_list_emails/#{id}", headers: self.get_headers).parsed_response
128
128
 
129
- return ApiResponse.new(resp)
129
+ return resp
130
130
  end
131
131
 
132
132
 
@@ -134,33 +134,33 @@ module ZeusSdk::V1
134
134
  def get_roles(query)
135
135
  resp = self.class.get("/api/v1/roles", query: query, headers: self.get_headers).parsed_response
136
136
 
137
- return ApiResponse.new(resp)
137
+ return resp
138
138
  end
139
139
 
140
140
  def get_role(id)
141
141
  resp = self.class.get("/api/v1/roles/#{id}", headers: self.get_headers).parsed_response
142
142
 
143
- return ApiResponse.new(resp)
143
+ return resp
144
144
  end
145
145
 
146
146
  def create_role(attributes)
147
147
  body = {role: attributes}
148
148
  resp = self.class.post("/api/v1/roles/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
149
149
 
150
- return ApiResponse.new(resp)
150
+ return resp
151
151
  end
152
152
 
153
153
  def update_role(id, attributes)
154
154
  body = {role: attributes}
155
155
  resp = self.class.put("/api/v1/roles/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
156
156
 
157
- return ApiResponse.new(resp)
157
+ return resp
158
158
  end
159
159
 
160
160
  def destroy_role(id)
161
161
  resp = self.class.delete("/api/v1/roles/#{id}", headers: self.get_headers).parsed_response
162
162
 
163
- return ApiResponse.new(resp)
163
+ return resp
164
164
  end
165
165
 
166
166
 
@@ -168,33 +168,33 @@ module ZeusSdk::V1
168
168
  def get_role_users(query)
169
169
  resp = self.class.get("/api/v1/role_users", query: query, headers: self.get_headers).parsed_response
170
170
 
171
- return ApiResponse.new(resp)
171
+ return resp
172
172
  end
173
173
 
174
174
  def get_role_user(id)
175
175
  resp = self.class.get("/api/v1/role_users/#{id}", headers: self.get_headers).parsed_response
176
176
 
177
- return ApiResponse.new(resp)
177
+ return resp
178
178
  end
179
179
 
180
180
  def create_role_user(attributes)
181
181
  body = {role_user: attributes}
182
182
  resp = self.class.post("/api/v1/role_users/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
183
183
 
184
- return ApiResponse.new(resp)
184
+ return resp
185
185
  end
186
186
 
187
187
  def update_role_user(id, attributes)
188
188
  body = {role_user: attributes}
189
189
  resp = self.class.put("/api/v1/role_users/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
190
190
 
191
- return ApiResponse.new(resp)
191
+ return resp
192
192
  end
193
193
 
194
194
  def destroy_role_user(id)
195
195
  resp = self.class.delete("/api/v1/role_users/#{id}", headers: self.get_headers).parsed_response
196
196
 
197
- return ApiResponse.new(resp)
197
+ return resp
198
198
  end
199
199
 
200
200
 
@@ -202,33 +202,33 @@ module ZeusSdk::V1
202
202
  def get_permissions(query)
203
203
  resp = self.class.get("/api/v1/permissions", query: query, headers: self.get_headers).parsed_response
204
204
 
205
- return ApiResponse.new(resp)
205
+ return resp
206
206
  end
207
207
 
208
208
  def get_permission(id)
209
209
  resp = self.class.get("/api/v1/permissions/#{id}", headers: self.get_headers).parsed_response
210
210
 
211
- return ApiResponse.new(resp)
211
+ return resp
212
212
  end
213
213
 
214
214
  def create_permission(permission)
215
215
  body = {permission: permission}
216
216
  resp = self.class.post("/api/v1/permissions/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
217
217
 
218
- return ApiResponse.new(resp)
218
+ return resp
219
219
  end
220
220
 
221
221
  def update_permission(id, attributes)
222
222
  body = {permission: attributes}
223
223
  resp = self.class.put("/api/v1/permissions/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
224
224
 
225
- return ApiResponse.new(resp)
225
+ return resp
226
226
  end
227
227
 
228
228
  def destroy_permission(id)
229
229
  resp = self.class.delete("/api/v1/permissions/#{id}", headers: self.get_headers).parsed_response
230
230
 
231
- return ApiResponse.new(resp)
231
+ return resp
232
232
  end
233
233
  end
234
234
 
@@ -4,7 +4,7 @@ module ZeusSdk::V1
4
4
 
5
5
  def initialize(obj)
6
6
  self.raw = obj
7
- self.image_id = obj["id"]
7
+ self.id = obj["id"]
8
8
  self.urls = obj["urls"]
9
9
  self.presigned_url = obj["presigned_url"]
10
10
  self.presigned_post = obj["presigned_post"]
@@ -14,7 +14,7 @@ module ZeusSdk::V1
14
14
 
15
15
  def as_json(options={})
16
16
  return {
17
- id: self.image_id,
17
+ id: self.id,
18
18
  urls: self.urls,
19
19
  presigned_url: self.presigned_url,
20
20
  presigned_post: self.presigned_post,
@@ -10,55 +10,55 @@ module ZeusSdk::V1
10
10
 
11
11
  def list_documents(query)
12
12
  resp = self.class.get("/api/v1/documents", query: query, headers: self.get_headers).parsed_response
13
- return ApiResponse.new(resp)
13
+ return resp
14
14
  end
15
15
 
16
16
  def create_document(document)
17
17
  body = {document: document}
18
18
  resp = self.class.post("/api/v1/documents", body: body.to_json, headers: self.get_headers).parsed_response
19
- return ApiResponse.new(resp)
19
+ return resp
20
20
  end
21
21
 
22
22
  def get_document(id)
23
23
  resp = self.class.get("/api/v1/documents/#{id}", headers: self.get_headers).parsed_response
24
- return ApiResponse.new(resp)
24
+ return resp
25
25
  end
26
26
 
27
27
  def update_document(id, document)
28
28
  body = {document: document}
29
29
  resp = self.class.put("/api/v1/documents/#{id}", body: body.to_json, headers: self.get_headers).parsed_response
30
- return ApiResponse.new(resp)
30
+ return resp
31
31
  end
32
32
 
33
33
  def destroy_document(id)
34
34
  resp = self.class.delete("/api/v1/documents/#{id}", headers: self.get_headers).parsed_response
35
- return ApiResponse.new(resp)
35
+ return resp
36
36
  end
37
37
 
38
38
  def list_nodes(query)
39
39
  resp = self.class.get("/api/v1/nodes", query: query, headers: self.get_headers).parsed_response
40
- return ApiResponse.new(resp)
40
+ return resp
41
41
  end
42
42
 
43
43
  def create_node(node)
44
44
  body = {node: node}
45
45
  resp = self.class.post("/api/v1/nodes", body: body.to_json, headers: self.get_headers).parsed_response
46
- return ApiResponse.new(resp)
46
+ return resp
47
47
  end
48
48
 
49
49
  def get_node(id)
50
50
  resp = self.class.get("/api/v1/nodes/#{id}", headers: self.get_headers).parsed_response
51
- return ApiResponse.new(resp)
51
+ return resp
52
52
  end
53
53
 
54
54
  def update_node(id, node)
55
55
  resp = self.class.put("/api/v1/nodes/#{id}", body: {node: node}.to_json, headers: self.get_headers).parsed_response
56
- return ApiResponse.new(resp)
56
+ return resp
57
57
  end
58
58
 
59
59
  def destroy_node(id)
60
60
  resp = self.class.delete("/api/v1/nodes/#{id}", headers: self.get_headers).parsed_response
61
- return ApiResponse.new(resp)
61
+ return resp
62
62
  end
63
63
  end
64
64
 
@@ -10,23 +10,23 @@ module ZeusSdk::V1
10
10
 
11
11
  def list_secrets(query)
12
12
  resp = self.class.get("/api/v1/secrets", query: query, headers: self.get_headers)
13
- return ApiResponse.new(resp)
13
+ return resp
14
14
  end
15
15
 
16
16
  def get_secret(key)
17
17
  resp = self.class.get("/api/v1/secrets/#{key}", headers: self.get_headers)
18
- return ApiResponse.new(resp)
18
+ return resp
19
19
  end
20
20
 
21
21
  def set_secret(key, value)
22
22
  body = {secret: {key: key, value: value}}
23
23
  resp = self.class.post("/api/v1/secrets", body: body.to_json, headers: self.get_headers)
24
- return ApiResponse.new(resp)
24
+ return resp
25
25
  end
26
26
 
27
27
  def delete_secret(key)
28
28
  resp = self.class.post("/api/v1/secrets/#{key}", headers: self.get_headers)
29
- return ApiResponse.new(resp)
29
+ return resp
30
30
  end
31
31
  end
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module ZeusSdk
2
- VERSION = "0.6.9"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeus_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.9
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Campbell