Class: Openlayer::Resources::Workspaces::APIKeys
- Inherits:
-
Object
- Object
- Openlayer::Resources::Workspaces::APIKeys
- Defined in:
- lib/openlayer/resources/workspaces/api_keys.rb
Instance Method Summary collapse
-
#create(workspace_id, name: nil, request_options: {}) ⇒ Openlayer::Models::Workspaces::APIKeyCreateResponse
Create a new API key in a workspace.
-
#initialize(client:) ⇒ APIKeys
constructor
private
A new instance of APIKeys.
Constructor Details
#initialize(client:) ⇒ APIKeys
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of APIKeys.
34 35 36 |
# File 'lib/openlayer/resources/workspaces/api_keys.rb', line 34 def initialize(client:) @client = client end |
Instance Method Details
#create(workspace_id, name: nil, request_options: {}) ⇒ Openlayer::Models::Workspaces::APIKeyCreateResponse
Create a new API key in a workspace.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/openlayer/resources/workspaces/api_keys.rb', line 20 def create(workspace_id, params = {}) parsed, = Openlayer::Workspaces::APIKeyCreateParams.dump_request(params) @client.request( method: :post, path: ["workspaces/%1$s/api-keys", workspace_id], body: parsed, model: Openlayer::Models::Workspaces::APIKeyCreateResponse, options: ) end |