Class: ZeusSdk::V1::Assets
- Inherits:
-
Object
- Object
- ZeusSdk::V1::Assets
show all
- Includes:
- HTTParty, ServiceBase
- Defined in:
- lib/zeus_sdk/v1/assets.rb
Constant Summary
collapse
- SUBDOMAIN =
"assets"
- LOCAL_PORT =
3004
Instance Attribute Summary
Attributes included from ServiceBase
#env, #environment_id, #project_id, #public_key, #scope, #secret_key, #zeus_auth_key
Instance Method Summary
collapse
#create_project_environment, #destroy_project_environment, #get_headers, #get_project_environment, #get_project_environments, included, #initialize, #update_project_environment
Instance Method Details
#create_image(image) ⇒ Object
16
17
18
19
20
|
# File 'lib/zeus_sdk/v1/assets.rb', line 16
def create_image(image)
body = {image: image}
resp = self.class.post("/api/v1/images", body: body.to_json, headers: self.).parsed_response
return resp
end
|
#destroy_image(id) ⇒ Object
38
39
40
41
|
# File 'lib/zeus_sdk/v1/assets.rb', line 38
def destroy_image(id)
resp = self.class.delete("/api/v1/images/#{id}", headers: self.).parsed_response
return resp
end
|
#get_image(id) ⇒ Object
22
23
24
25
|
# File 'lib/zeus_sdk/v1/assets.rb', line 22
def get_image(id)
resp = self.class.get("/api/v1/images/#{id}", headers: self.).parsed_response
return resp
end
|
#get_image_variants(id) ⇒ Object
27
28
29
30
|
# File 'lib/zeus_sdk/v1/assets.rb', line 27
def get_image_variants(id)
resp = self.class.get("/api/v1/images/#{id}/variants", headers: self.).parsed_response
return resp
end
|
#list_images(query) ⇒ Object
11
12
13
14
|
# File 'lib/zeus_sdk/v1/assets.rb', line 11
def list_images(query)
resp = self.class.get("/api/v1/images", query: query, headers: self.).parsed_response
return resp
end
|
#update_image(id, image) ⇒ Object
32
33
34
35
36
|
# File 'lib/zeus_sdk/v1/assets.rb', line 32
def update_image(id, image)
body = {image: image}
resp = self.class.put("/api/v1/images/#{id}", body: body.to_json, headers: self.).parsed_response
return resp
end
|