Class: LabClient::PipelineSchedules

Inherits:
Common
  • Object
show all
Includes:
ClassHelpers
Defined in:
lib/labclient/projects/pipeline_schedules/list.rb,
lib/labclient/projects/pipeline_schedules/play.rb,
lib/labclient/projects/pipeline_schedules/show.rb,
lib/labclient/projects/pipeline_schedules/client.rb,
lib/labclient/projects/pipeline_schedules/create.rb,
lib/labclient/projects/pipeline_schedules/delete.rb,
lib/labclient/projects/pipeline_schedules/update.rb,
lib/labclient/projects/pipeline_schedules/take_ownership.rb,
lib/labclient/projects/pipeline_schedules/variables/client.rb

Overview

Specifics

Constant Summary

Constants included from AccessLevel

AccessLevel::HUMAN_ACCESS_LEVELS, AccessLevel::MACHINE_ACCESS_LEVELS

Instance Attribute Summary

Attributes inherited from Common

#client

Instance Method Summary collapse

Methods included from ClassHelpers

#has?, #keys, #raw

Methods inherited from Common

#api_methods, #api_methods_help, #format_id, #format_query_id, #format_query_ids, #format_time?, #group_name, #help, #initialize, #inspect, #klass, #protected_query_access_level, #query_access_level, #query_format_time

Methods included from Docs

#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title

Methods included from AccessLevel

#human_access_level, #human_protected_access_level, #machine_access_level, #machine_protected_access_level

Constructor Details

This class inherits a constructor from LabClient::Common

Instance Method Details

#create(project_id, query = {}) ⇒ Object



29
30
31
32
33
# File 'lib/labclient/projects/pipeline_schedules/create.rb', line 29

def create(project_id, query = {})
  project_id = format_id(project_id)

  client.request(:post, "projects/#{project_id}/pipeline_schedules", PipelineSchedule, query)
end

#delete(project_id, pipeline_schedule_id) ⇒ Object



20
21
22
23
24
# File 'lib/labclient/projects/pipeline_schedules/delete.rb', line 20

def delete(project_id, pipeline_schedule_id)
  pipeline_schedule_id = format_id(pipeline_schedule_id)
  project_id = format_id(project_id)
  client.request(:delete, "projects/#{project_id}/pipeline_schedules/#{pipeline_schedule_id}")
end

#list(project_id, query = {}) ⇒ Object

List



22
23
24
25
26
# File 'lib/labclient/projects/pipeline_schedules/list.rb', line 22

def list(project_id, query = {})
  project_id = format_id(project_id)

  client.request(:get, "projects/#{project_id}/pipeline_schedules", PipelineSchedule, query)
end

#play(project_id, pipeline_schedule_id) ⇒ Object



22
23
24
25
26
27
# File 'lib/labclient/projects/pipeline_schedules/play.rb', line 22

def play(project_id, pipeline_schedule_id)
  pipeline_schedule_id = format_id(pipeline_schedule_id)
  project_id = format_id(project_id)

  client.request(:post, "projects/#{project_id}/pipeline_schedules/#{pipeline_schedule_id}/play")
end

#show(project_id, pipeline_schedule_id) ⇒ Object

Show Specific



14
15
16
17
18
# File 'lib/labclient/projects/pipeline_schedules/show.rb', line 14

def show(project_id, pipeline_schedule_id)
  pipeline_schedule_id = format_id(pipeline_schedule_id)
  project_id = format_id(project_id)
  client.request(:get, "projects/#{project_id}/pipeline_schedules/#{pipeline_schedule_id}", PipelineSchedule)
end

#take_ownership(project_id, pipeline_schedule_id) ⇒ Object



22
23
24
25
26
27
# File 'lib/labclient/projects/pipeline_schedules/take_ownership.rb', line 22

def take_ownership(project_id, pipeline_schedule_id)
  pipeline_schedule_id = format_id(pipeline_schedule_id)
  project_id = format_id(project_id)

  client.request(:post, "projects/#{project_id}/pipeline_schedules/#{pipeline_schedule_id}/take_ownership", PipelineSchedule)
end

#update(project_id, pipeline_schedule_id, query = {}) ⇒ Object



36
37
38
39
40
41
# File 'lib/labclient/projects/pipeline_schedules/update.rb', line 36

def update(project_id, pipeline_schedule_id, query = {})
  pipeline_schedule_id = format_id(pipeline_schedule_id)
  project_id = format_id(project_id)

  client.request(:put, "projects/#{project_id}/pipeline_schedules/#{pipeline_schedule_id}", PipelineSchedule, query)
end

#variablesObject



13
14
15
# File 'lib/labclient/projects/pipeline_schedules/variables/client.rb', line 13

def variables
  PipelineVariables.new(client)
end