Class: Seam::Http::MultiWorkspace
- Inherits:
-
Object
- Object
- Seam::Http::MultiWorkspace
- Defined in:
- lib/seam/http_multi_workspace.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#defaults ⇒ Object
readonly
Returns the value of attribute defaults.
Class Method Summary collapse
- .from_personal_access_token(personal_access_token, endpoint: nil, wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {}) ⇒ Object
- .lts_version ⇒ Object
Instance Method Summary collapse
-
#initialize(personal_access_token:, endpoint: nil, wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {}) ⇒ MultiWorkspace
constructor
A new instance of MultiWorkspace.
- #lts_version ⇒ Object
- #workspaces ⇒ Object
Constructor Details
#initialize(personal_access_token:, endpoint: nil, wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {}) ⇒ MultiWorkspace
Returns a new instance of MultiWorkspace.
17 18 19 20 21 22 23 24 25 |
# File 'lib/seam/http_multi_workspace.rb', line 17 def initialize(personal_access_token:, endpoint: nil, wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {}) @wait_for_action_attempt = wait_for_action_attempt @defaults = {"wait_for_action_attempt" => wait_for_action_attempt} @endpoint = Http::Options.get_endpoint(endpoint) @auth_headers = Http::Auth.get_auth_headers_for_multi_workspace_personal_access_token(personal_access_token) @client = Http::Request.create_faraday_client(@endpoint, @auth_headers, , ) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
15 16 17 |
# File 'lib/seam/http_multi_workspace.rb', line 15 def client @client end |
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults.
15 16 17 |
# File 'lib/seam/http_multi_workspace.rb', line 15 def defaults @defaults end |
Class Method Details
.from_personal_access_token(personal_access_token, endpoint: nil, wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {}) ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/seam/http_multi_workspace.rb', line 39 def self.from_personal_access_token(personal_access_token, endpoint: nil, wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {}) new( personal_access_token: personal_access_token, endpoint: endpoint, wait_for_action_attempt: wait_for_action_attempt, faraday_options: , faraday_retry_options: ) end |
.lts_version ⇒ Object
27 28 29 |
# File 'lib/seam/http_multi_workspace.rb', line 27 def self.lts_version Seam::LTS_VERSION end |
Instance Method Details
#lts_version ⇒ Object
31 32 33 |
# File 'lib/seam/http_multi_workspace.rb', line 31 def lts_version Seam::LTS_VERSION end |
#workspaces ⇒ Object
35 36 37 |
# File 'lib/seam/http_multi_workspace.rb', line 35 def workspaces @workspaces ||= WorkspacesProxy.new(Seam::Clients::Workspaces.new(client: @client, defaults: @defaults)) end |