class SemaphoreClient
Constants
- API_URL
- API_VERSION
- VERSION
Public Class Methods
new(auth_token, options = {})
click to toggle source
# File lib/semaphore_client.rb, line 31 def initialize(auth_token, options = {}) @auth_token = auth_token @api_url = options.fetch(:api_url, API_URL) @api_version = options.fetch(:api_version, API_VERSION) @logger = options.fetch(:logger, nil) @auto_paginate = options.fetch(:auto_paginate, false) end
Public Instance Methods
config_files()
click to toggle source
# File lib/semaphore_client.rb, line 64 def config_files @config_file_api ||= SemaphoreClient::Api::ConfigFile.new(http_client) end
env_vars()
click to toggle source
# File lib/semaphore_client.rb, line 60 def env_vars @env_var_api ||= SemaphoreClient::Api::EnvVar.new(http_client) end
orgs()
click to toggle source
# File lib/semaphore_client.rb, line 44 def orgs @org_api ||= SemaphoreClient::Api::Org.new(http_client) end
pipelines()
click to toggle source
# File lib/semaphore_client.rb, line 68 def pipelines @pipeline_api ||= SemaphoreClient::Api::Pipeline.new(http_client) end
projects()
click to toggle source
# File lib/semaphore_client.rb, line 52 def projects @project_api ||= SemaphoreClient::Api::Project.new(http_client) end
secrets()
click to toggle source
# File lib/semaphore_client.rb, line 56 def secrets @secret_api ||= SemaphoreClient::Api::Secret.new(http_client) end
teams()
click to toggle source
# File lib/semaphore_client.rb, line 48 def teams @team_api ||= SemaphoreClient::Api::Team.new(http_client) end
users()
click to toggle source
# File lib/semaphore_client.rb, line 40 def users @user_api ||= SemaphoreClient::Api::User.new(http_client) end
Private Instance Methods
http_client()
click to toggle source
# File lib/semaphore_client.rb, line 74 def http_client @http_client ||= SemaphoreClient::HttpClient.new(@auth_token, @api_url, @api_version, @logger, @auto_paginate) end