Class: Composio::APIKeysApi

Inherits:
Object
  • Object
show all
Defined in:
lib/composio/api/api_keys_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ APIKeysApi

Returns a new instance of APIKeysApi.



15
16
17
# File 'lib/composio/api/api_keys_api.rb', line 15

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/composio/api/api_keys_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#generate(name:, extra: {}) ⇒ Object

Generate api key

Parameters:

  • name (String)

    The name of the API key to be generated

  • body (GenerateAPIKeyReqDTO)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



24
25
26
27
28
29
30
# File 'lib/composio/api/api_keys_api.rb', line 24

def generate(name:, extra: {})
  _body = {}
  _body[:name] = name if name != SENTINEL
  generate_api_key_req_dto = _body
  api_response = generate_with_http_info_impl(generate_api_key_req_dto, extra)
  api_response.data
end

#generate_with_http_info(name:, extra: {}) ⇒ Object

Generate api key

Parameters:

  • name (String)

    The name of the API key to be generated

  • body (GenerateAPIKeyReqDTO)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



37
38
39
40
41
42
# File 'lib/composio/api/api_keys_api.rb', line 37

def generate_with_http_info(name:, extra: {})
  _body = {}
  _body[:name] = name if name != SENTINEL
  generate_api_key_req_dto = _body
  generate_with_http_info_impl(generate_api_key_req_dto, extra)
end

#list(extra: {}) ⇒ Object

List api keys

Parameters:

  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



114
115
116
117
# File 'lib/composio/api/api_keys_api.rb', line 114

def list(extra: {})
  api_response = list_with_http_info_impl(extra)
  api_response.data
end

#list_with_http_info(extra: {}) ⇒ Object

List api keys

Parameters:

  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



122
123
124
# File 'lib/composio/api/api_keys_api.rb', line 122

def list_with_http_info(extra: {})
  list_with_http_info_impl(extra)
end

#remove(id:, extra: {}) ⇒ Object

Delete api key

Parameters:

  • id (String)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



186
187
188
189
# File 'lib/composio/api/api_keys_api.rb', line 186

def remove(id:, extra: {})
  api_response = remove_with_http_info_impl(id, extra)
  api_response.data
end

#remove_with_http_info(id:, extra: {}) ⇒ Object

Delete api key

Parameters:

  • id (String)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



195
196
197
# File 'lib/composio/api/api_keys_api.rb', line 195

def remove_with_http_info(id:, extra: {})
  remove_with_http_info_impl(id, extra)
end