Module: Mattermost::Endpoint::Jobs
- Included in:
- Mattermost::Endpoint
- Defined in:
- lib/mattermost/endpoint/jobs.rb
Instance Method Summary collapse
- #cancel_job(job_id) ⇒ Object
- #create_job(job) ⇒ Object
- #get_job(job_id) ⇒ Object
- #get_jobs(max = 60) ⇒ Object
- #get_jobs_of_type(type, max = 60) ⇒ Object
Instance Method Details
#cancel_job(job_id) ⇒ Object
19 20 21 |
# File 'lib/mattermost/endpoint/jobs.rb', line 19 def cancel_job(job_id) post("/jobs/#{job_id}/cancel") end |
#create_job(job) ⇒ Object
11 12 13 |
# File 'lib/mattermost/endpoint/jobs.rb', line 11 def create_job(job) post("/jobs", :body => job.to_json) end |
#get_job(job_id) ⇒ Object
15 16 17 |
# File 'lib/mattermost/endpoint/jobs.rb', line 15 def get_job(job_id) get("/jobs/#{job_id}") end |
#get_jobs(max = 60) ⇒ Object
7 8 9 |
# File 'lib/mattermost/endpoint/jobs.rb', line 7 def get_jobs(max = 60) get("/jobs?per_page=#{max}") end |
#get_jobs_of_type(type, max = 60) ⇒ Object
23 24 25 |
# File 'lib/mattermost/endpoint/jobs.rb', line 23 def get_jobs_of_type(type, max = 60) get("/jobs/type/#{type}?per_page=#{max}") end |