Class: Composio::CLIApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CLIApi

Returns a new instance of CLIApi.



15
16
17
# File 'lib/composio/api/cli_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/cli_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#exchange_code(extra: {}) ⇒ Object

Handle cli code exchange

Parameters:

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

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



22
23
24
25
# File 'lib/composio/api/cli_api.rb', line 22

def exchange_code(extra: {})
  api_response = exchange_code_with_http_info_impl(extra)
  api_response.data
end

#exchange_code_with_http_info(extra: {}) ⇒ Object

Handle cli code exchange

Parameters:

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

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



30
31
32
# File 'lib/composio/api/cli_api.rb', line 30

def exchange_code_with_http_info(extra: {})
  exchange_code_with_http_info_impl(extra)
end

#get_code(key:, code: SENTINEL, extra: {}) ⇒ Object

Get cli code

Parameters:

  • key (String)
  • code (String) (defaults to: SENTINEL)
  • extra (Hash) (defaults to: {})

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



95
96
97
98
99
# File 'lib/composio/api/cli_api.rb', line 95

def get_code(key:, code: SENTINEL, extra: {})
  extra[:code] = code if code != SENTINEL
  api_response = get_code_with_http_info_impl(key, extra)
  api_response.data
end

#get_code_with_http_info(key:, code: SENTINEL, extra: {}) ⇒ Object

Get cli code

Parameters:

  • key (String)
  • code (String) (defaults to: SENTINEL)
  • extra (Hash) (defaults to: {})

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



106
107
108
109
# File 'lib/composio/api/cli_api.rb', line 106

def get_code_with_http_info(key:, code: SENTINEL, extra: {})
  extra[:code] = code if code != SENTINEL
  get_code_with_http_info_impl(key, extra)
end

#verify_code(key:, code: SENTINEL, extra: {}) ⇒ Object

Handle cli code verification

Parameters:

  • key (String)
  • code (String) (defaults to: SENTINEL)
  • extra (Hash) (defaults to: {})

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



182
183
184
185
186
# File 'lib/composio/api/cli_api.rb', line 182

def verify_code(key:, code: SENTINEL, extra: {})
  extra[:code] = code if code != SENTINEL
  api_response = verify_code_with_http_info_impl(key, extra)
  api_response.data
end

#verify_code_with_http_info(key:, code: SENTINEL, extra: {}) ⇒ Object

Handle cli code verification

Parameters:

  • key (String)
  • code (String) (defaults to: SENTINEL)
  • extra (Hash) (defaults to: {})

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



193
194
195
196
# File 'lib/composio/api/cli_api.rb', line 193

def verify_code_with_http_info(key:, code: SENTINEL, extra: {})
  extra[:code] = code if code != SENTINEL
  verify_code_with_http_info_impl(key, extra)
end