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/model/secret.rb,
lib/semaphore_client/model/env_var.rb,
lib/semaphore_client/model/project.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.0.1"
Instance Method Summary collapse
- #config_files ⇒ Object
- #env_vars ⇒ Object
-
#initialize(auth_token, options = {}) ⇒ SemaphoreClient
constructor
A new instance of SemaphoreClient.
- #orgs ⇒ Object
- #projects ⇒ Object
- #secrets ⇒ Object
- #teams ⇒ Object
- #users ⇒ Object
Constructor Details
#initialize(auth_token, options = {}) ⇒ SemaphoreClient
Returns a new instance of SemaphoreClient.
29 30 31 32 33 34 35 36 |
# File 'lib/semaphore_client.rb', line 29 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
62 63 64 |
# File 'lib/semaphore_client.rb', line 62 def config_files @config_file_api ||= SemaphoreClient::Api::ConfigFile.new(http_client) end |
#env_vars ⇒ Object
58 59 60 |
# File 'lib/semaphore_client.rb', line 58 def env_vars @env_var_api ||= SemaphoreClient::Api::EnvVar.new(http_client) end |
#orgs ⇒ Object
42 43 44 |
# File 'lib/semaphore_client.rb', line 42 def orgs @org_api ||= SemaphoreClient::Api::Org.new(http_client) end |
#projects ⇒ Object
50 51 52 |
# File 'lib/semaphore_client.rb', line 50 def projects @project_api ||= SemaphoreClient::Api::Project.new(http_client) end |
#secrets ⇒ Object
54 55 56 |
# File 'lib/semaphore_client.rb', line 54 def secrets @secret_api ||= SemaphoreClient::Api::Secret.new(http_client) end |
#teams ⇒ Object
46 47 48 |
# File 'lib/semaphore_client.rb', line 46 def teams @team_api ||= SemaphoreClient::Api::Team.new(http_client) end |
#users ⇒ Object
38 39 40 |
# File 'lib/semaphore_client.rb', line 38 def users @user_api ||= SemaphoreClient::Api::User.new(http_client) end |