class OrchestratorClient::Jobs

Public Class Methods

new(http) click to toggle source
# File lib/orchestrator_client/jobs.rb, line 3
def initialize(http)
  @https = http
end

Public Instance Methods

all(limit=nil) click to toggle source
# File lib/orchestrator_client/jobs.rb, line 7
def all(limit=nil)
  url = "jobs"
  if limit
    url << "?limit=#{limit}"
  end

  @https.get(url)
end
details(id) click to toggle source
# File lib/orchestrator_client/jobs.rb, line 16
def details(id)
  @https.get("jobs/#{id}")
end
events(id, start = nil) click to toggle source
# File lib/orchestrator_client/jobs.rb, line 28
def events(id, start = nil)
  url = "jobs/#{id}/events"
  if start
    url << "?start=#{start}"
  end

  @https.get(url)
end
nodes(id) click to toggle source
# File lib/orchestrator_client/jobs.rb, line 20
def nodes(id)
  @https.get("jobs/#{id}/nodes")
end
report(id) click to toggle source
# File lib/orchestrator_client/jobs.rb, line 24
def report(id)
  @https.get("jobs/#{id}/report")
end