class SemaphoreClient::Api::Pipeline
Public Class Methods
new(http_client)
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 4 def initialize(http_client) @http_client = http_client end
Public Instance Methods
create(params = nil, options = {})
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 22 def create(params = nil, options = {}) create!(params, options) rescue SemaphoreClient::Exceptions::ResponseError end
create!(params = nil, options = {})
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 27 def create!(params = nil, options = {}) path = "/pipelines" response = @http_client.post(path, params, options) SemaphoreClient::Model::Pipeline.load(response.body) end
get(id, params = nil, options = {})
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 36 def get(id, params = nil, options = {}) get!(id, params, options) rescue SemaphoreClient::Exceptions::ResponseError end
get!(id, params = nil, options = {})
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 41 def get!(id, params = nil, options = {}) path = "/pipelines/#{id}" response = @http_client.get(path, params = {}) SemaphoreClient::Model::Pipeline.load(response.body) end
list(params = nil, options = {})
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 9 def list(params = nil, options = {}) list!(params, options) rescue SemaphoreClient::Exceptions::ResponseError end
list!(params = nil, options = {})
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 14 def list!(params = nil, options = {}) path = "/pipelines" @http_client.get(path, params, options).body.map { |e| SemaphoreClient::Model::Pipeline.load(e) } end
update(id, params = nil, options = {})
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 50 def update(id, params = nil, options = {}) update!(id, params, options) rescue SemaphoreClient::Exceptions::ResponseError end
update!(id, params = nil, options = {})
click to toggle source
# File lib/semaphore_client/api/pipeline.rb, line 55 def update!(id, params = nil, options = {}) path = "/pipelines/#{id}" response = @http_client.patch(path, params) SemaphoreClient::Model::Pipeline.load(response.body) end