Module: DroneCI::TemplatesAPI

Included in:
API
Defined in:
lib/drone-ci/api/templates.rb

Instance Method Summary collapse

Instance Method Details

#template_create(namespace, **body) ⇒ Object



6
7
8
# File 'lib/drone-ci/api/templates.rb', line 6

def template_create(namespace, **body)
  api.post("templates/#{namespace}", body)
end

#template_delete(namespace, name) ⇒ Object



11
12
13
# File 'lib/drone-ci/api/templates.rb', line 11

def template_delete(namespace, name)
  api.delete("templates/#{namespace}/#{name}")
end

#template_info(namespace, name) ⇒ Object



16
17
18
# File 'lib/drone-ci/api/templates.rb', line 16

def template_info(namespace, name)
  api.get("templates/#{namespace}/#{name}")
end

#template_list(namespace) ⇒ Object



21
22
23
# File 'lib/drone-ci/api/templates.rb', line 21

def template_list(namespace)
  api.get("templates/#{namespace}")
end

#template_update(namespace, name, **body) ⇒ Object



26
27
28
# File 'lib/drone-ci/api/templates.rb', line 26

def template_update(namespace, name, **body)
  api.patch("templates/#{namespace}/#{name}", body)
end