Class: SemaphoreClient
- Inherits:
-
Object
- Object
- SemaphoreClient
- Defined in:
- lib/semaphore_client.rb,
lib/semaphore_client/api/org.rb,
lib/semaphore_client/version.rb,
lib/semaphore_client/api/team.rb,
lib/semaphore_client/api/user.rb,
lib/semaphore_client/model/org.rb,
lib/semaphore_client/api/secret.rb,
lib/semaphore_client/exceptions.rb,
lib/semaphore_client/model/team.rb,
lib/semaphore_client/model/user.rb,
lib/semaphore_client/api/env_var.rb,
lib/semaphore_client/api/project.rb,
lib/semaphore_client/http_client.rb,
lib/semaphore_client/api/pipeline.rb,
lib/semaphore_client/model/secret.rb,
lib/semaphore_client/model/env_var.rb,
lib/semaphore_client/model/project.rb,
lib/semaphore_client/model/pipeline.rb,
lib/semaphore_client/api/config_file.rb,
lib/semaphore_client/model/config_file.rb
Defined Under Namespace
Modules: Api, Model Classes: Exceptions, HttpClient
Constant Summary collapse
- API_URL =
"https://api.semaphoreci.com"
- API_VERSION =
"v2"
- VERSION =
"3.2.0"
Instance Method Summary collapse
- #config_files ⇒ Object
- #env_vars ⇒ Object
-
#initialize(auth_token, options = {}) ⇒ SemaphoreClient
constructor
A new instance of SemaphoreClient.
- #orgs ⇒ Object
- #pipelines ⇒ Object
- #projects ⇒ Object
- #secrets ⇒ Object
- #teams ⇒ Object
- #users ⇒ Object
Constructor Details
#initialize(auth_token, options = {}) ⇒ SemaphoreClient
Returns a new instance of SemaphoreClient.
31 32 33 34 35 36 37 38 |
# File 'lib/semaphore_client.rb', line 31 def initialize(auth_token, = {}) @auth_token = auth_token @api_url = .fetch(:api_url, API_URL) @api_version = .fetch(:api_version, API_VERSION) @logger = .fetch(:logger, nil) @auto_paginate = .fetch(:auto_paginate, false) end |
Instance Method Details
#config_files ⇒ Object
64 65 66 |
# File 'lib/semaphore_client.rb', line 64 def config_files @config_file_api ||= SemaphoreClient::Api::ConfigFile.new(http_client) end |
#env_vars ⇒ Object
60 61 62 |
# File 'lib/semaphore_client.rb', line 60 def env_vars @env_var_api ||= SemaphoreClient::Api::EnvVar.new(http_client) end |
#orgs ⇒ Object
44 45 46 |
# File 'lib/semaphore_client.rb', line 44 def orgs @org_api ||= SemaphoreClient::Api::Org.new(http_client) end |
#pipelines ⇒ Object
68 69 70 |
# File 'lib/semaphore_client.rb', line 68 def pipelines @pipeline_api ||= SemaphoreClient::Api::Pipeline.new(http_client) end |
#projects ⇒ Object
52 53 54 |
# File 'lib/semaphore_client.rb', line 52 def projects @project_api ||= SemaphoreClient::Api::Project.new(http_client) end |
#secrets ⇒ Object
56 57 58 |
# File 'lib/semaphore_client.rb', line 56 def secrets @secret_api ||= SemaphoreClient::Api::Secret.new(http_client) end |
#teams ⇒ Object
48 49 50 |
# File 'lib/semaphore_client.rb', line 48 def teams @team_api ||= SemaphoreClient::Api::Team.new(http_client) end |
#users ⇒ Object
40 41 42 |
# File 'lib/semaphore_client.rb', line 40 def users @user_api ||= SemaphoreClient::Api::User.new(http_client) end |