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/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/env_var.rb,
lib/semaphore_client/model/project.rb,
lib/semaphore_client/api/config_file.rb,
lib/semaphore_client/api/shared_config.rb,
lib/semaphore_client/model/config_file.rb,
lib/semaphore_client/model/shared_config.rb
Defined Under Namespace
Modules: Api, Model Classes: Exceptions, HttpClient
Constant Summary collapse
- API_URL =
"https://api.semaphoreci.com"- API_VERSION =
"v2"- VERSION =
"2.4.0"
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
- #shared_configs ⇒ 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 37 |
# 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) @verbose = .fetch(:verbose, false) @logger = .fetch(:logger, Logger.new(STDOUT)) @auto_paginate = .fetch(:auto_paginate, false) end |
Instance Method Details
#config_files ⇒ Object
63 64 65 |
# File 'lib/semaphore_client.rb', line 63 def config_files @config_file_api ||= SemaphoreClient::Api::ConfigFile.new(http_client) end |
#env_vars ⇒ Object
59 60 61 |
# File 'lib/semaphore_client.rb', line 59 def env_vars @env_var_api ||= SemaphoreClient::Api::EnvVar.new(http_client) end |
#orgs ⇒ Object
43 44 45 |
# File 'lib/semaphore_client.rb', line 43 def orgs @org_api ||= SemaphoreClient::Api::Org.new(http_client) end |
#projects ⇒ Object
51 52 53 |
# File 'lib/semaphore_client.rb', line 51 def projects @project_api ||= SemaphoreClient::Api::Project.new(http_client) end |
#shared_configs ⇒ Object
55 56 57 |
# File 'lib/semaphore_client.rb', line 55 def shared_configs @shared_config_api ||= SemaphoreClient::Api::SharedConfig.new(http_client) end |
#teams ⇒ Object
47 48 49 |
# File 'lib/semaphore_client.rb', line 47 def teams @team_api ||= SemaphoreClient::Api::Team.new(http_client) end |
#users ⇒ Object
39 40 41 |
# File 'lib/semaphore_client.rb', line 39 def users @user_api ||= SemaphoreClient::Api::User.new(http_client) end |