module Mattermost::Endpoint::Jobs
Public Instance Methods
cancel_job(job_id)
click to toggle source
# File lib/mattermost/endpoint/jobs.rb, line 19 def cancel_job(job_id) post("/jobs/#{job_id}/cancel") end
create_job(job)
click to toggle source
# File lib/mattermost/endpoint/jobs.rb, line 11 def create_job(job) post("/jobs", :body => job.to_json) end
get_job(job_id)
click to toggle source
# File lib/mattermost/endpoint/jobs.rb, line 15 def get_job(job_id) get("/jobs/#{job_id}") end
get_jobs(max = 60)
click to toggle source
# 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)
click to toggle source
# File lib/mattermost/endpoint/jobs.rb, line 23 def get_jobs_of_type(type, max = 60) get("/jobs/type/#{type}?per_page=#{max}") end