Module: DroneCI::CronAPI
- Included in:
- API
- Defined in:
- lib/drone-ci/api/cron.rb
Instance Method Summary collapse
-
#cron_create(owner, repo, **body) ⇒ Object
Create a new cron job.
-
#cron_delete(owner, repo, name) ⇒ Object
Deletes a cron job.
-
#cron_info(owner, repo, name) ⇒ Object
Returns the named cron job.
-
#cron_list(owner, repo) ⇒ Object
Returns the cron job list.
-
#cron_trigger(owner, repo, name) ⇒ Object
Trigger an existing cron task.
-
#cron_update(owner, repo, name, **body) ⇒ Object
Updates the named cron job.
Instance Method Details
#cron_create(owner, repo, **body) ⇒ Object
Create a new cron job.
Please note this api requires write access to the repository.
Reference: docs.drone.io/api/cron/cron_create/
10 11 12 |
# File 'lib/drone-ci/api/cron.rb', line 10 def cron_create(owner, repo, **body) api.post("repos/#{owner}/#{repo}/cron", body) end |
#cron_delete(owner, repo, name) ⇒ Object
Deletes a cron job.
Please note this api requires write access to the repository.
Reference: docs.drone.io/api/cron/cron_delete/
19 20 21 |
# File 'lib/drone-ci/api/cron.rb', line 19 def cron_delete(owner, repo, name) api.delete("repos/#{owner}/#{repo}/cron/#{name}") end |
#cron_info(owner, repo, name) ⇒ Object
Returns the named cron job.
Please note this api requires write access to the repository.
Reference: docs.drone.io/api/cron/cron_info/
28 29 30 |
# File 'lib/drone-ci/api/cron.rb', line 28 def cron_info(owner, repo, name) api.get("repos/#{owner}/#{repo}/cron/#{name}") end |
#cron_list(owner, repo) ⇒ Object
Returns the cron job list.
Please note this api requires write access to the repository.
Reference: docs.drone.io/api/cron/cron_list/
37 38 39 |
# File 'lib/drone-ci/api/cron.rb', line 37 def cron_list(owner, repo) api.get("repos/#{owner}/#{repo}/cron") end |
#cron_trigger(owner, repo, name) ⇒ Object
Trigger an existing cron task.
Please note this api requires write access to the repository.
Reference: docs.drone.io/api/cron/cron_trigger/
46 47 48 |
# File 'lib/drone-ci/api/cron.rb', line 46 def cron_trigger(owner, repo, name) api.post("repos/#{owner}/#{repo}/cron/#{name}") end |
#cron_update(owner, repo, name, **body) ⇒ Object
Updates the named cron job.
Please note this api requires write access to the repository.
Reference: docs.drone.io/api/cron/cron_update/
55 56 57 |
# File 'lib/drone-ci/api/cron.rb', line 55 def cron_update(owner, repo, name, **body) api.patch("repos/#{owner}/#{repo}/cron/#{name}", body) end |