Sha256: bd3d5a880cfcb05087815861f9b862ff6fbb5b3e4c57adfd13bf121d46b9ddd4

Contents?: true

Size: 439 Bytes

Versions: 10

Compression:

Stored size: 439 Bytes

Contents

require 'json'

module Mattermost
	module Endpoint
		module Jobs

			def get_jobs(max = 60)
				get("/jobs?per_page=#{max}")
			end

			def create_job(job)
				post("/jobs", :body => job.to_json)
			end

			def get_job(job_id)
				get("/jobs/#{job_id}")
			end

			def cancel_job(job_id)
				post("/jobs/#{job_id}/cancel")
			end

			def get_jobs_of_type(type, max = 60)
				get("/jobs/type/#{type}?per_page=#{max}")
			end
		end
	end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mattermost-api4-ruby-0.0.10 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.9 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.8 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.7 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.6 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.5 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.4 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.3 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.2 lib/mattermost/endpoint/jobs.rb
mattermost-api4-ruby-0.0.1 lib/mattermost/endpoint/jobs.rb