Class: RenderRuby::DeployResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/render_ruby/resources/deploys.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from RenderRuby::Resource

Instance Method Details

#list(service_id:, **params) ⇒ Object



5
6
7
8
9
# File 'lib/render_ruby/resources/deploys.rb', line 5

def list(service_id:, **params)
  response = get_request("services/#{service_id}/deploys", params: params)

  Collection.from_response(response, type: Deploy)
end

#retrieve(service_id:, deploy_id:) ⇒ Object



15
16
17
# File 'lib/render_ruby/resources/deploys.rb', line 15

def retrieve(service_id:, deploy_id:)
  Deploy.new get_request("services/#{service_id}/deploys/#{deploy_id}").body
end

#trigger(service_id:, clear_cache:) ⇒ Object



11
12
13
# File 'lib/render_ruby/resources/deploys.rb', line 11

def trigger(service_id:, clear_cache:)
  Deploy.new post_request("services/#{service_id}/deploys", body: { clearCache: clear_cache }).body
end