composio 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: composio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-26 00:00:00.000000000 Z
11
+ date: 2024-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -89,12 +89,9 @@ files:
89
89
  - lib/composio/api/api_keys_api.rb
90
90
  - lib/composio/api/apps_api.rb
91
91
  - lib/composio/api/auth_api.rb
92
- - lib/composio/api/cli_api.rb
93
92
  - lib/composio/api/connections_api.rb
94
93
  - lib/composio/api/integrations_api.rb
95
94
  - lib/composio/api/logs_api.rb
96
- - lib/composio/api/metadata_api.rb
97
- - lib/composio/api/team_api.rb
98
95
  - lib/composio/api/triggers_api.rb
99
96
  - lib/composio/api_client.rb
100
97
  - lib/composio/api_client_custom.rb
@@ -220,12 +217,9 @@ files:
220
217
  - spec/api/api_keys_api_spec.rb
221
218
  - spec/api/apps_api_spec.rb
222
219
  - spec/api/auth_api_spec.rb
223
- - spec/api/cli_api_spec.rb
224
220
  - spec/api/connections_api_spec.rb
225
221
  - spec/api/integrations_api_spec.rb
226
222
  - spec/api/logs_api_spec.rb
227
- - spec/api/metadata_api_spec.rb
228
- - spec/api/team_api_spec.rb
229
223
  - spec/api/triggers_api_spec.rb
230
224
  - spec/api_client_spec.rb
231
225
  - spec/configuration_spec.rb
@@ -352,7 +346,7 @@ licenses:
352
346
  metadata:
353
347
  documentation_uri: https://github.com/konfig-dev/composio-sdks/tree/main/ruby
354
348
  source_code_uri: https://github.com/konfig-dev/composio-sdks/tree/main/ruby
355
- post_install_message:
349
+ post_install_message:
356
350
  rdoc_options: []
357
351
  require_paths:
358
352
  - lib
@@ -367,138 +361,135 @@ required_rubygems_version: !ruby/object:Gem::Requirement
367
361
  - !ruby/object:Gem::Version
368
362
  version: '0'
369
363
  requirements: []
370
- rubygems_version: 3.3.7
371
- signing_key:
364
+ rubygems_version: 3.2.5
365
+ signing_key:
372
366
  specification_version: 4
373
367
  summary: Composio OpenAPI Ruby Gem
374
368
  test_files:
369
+ - spec/api/connections_api_spec.rb
370
+ - spec/api/integrations_api_spec.rb
371
+ - spec/api/triggers_api_spec.rb
375
372
  - spec/api/actions_api_spec.rb
373
+ - spec/api/apps_api_spec.rb
376
374
  - spec/api/logs_api_spec.rb
377
- - spec/api/metadata_api_spec.rb
378
375
  - spec/api/auth_api_spec.rb
379
- - spec/api/integrations_api_spec.rb
380
- - spec/api/team_api_spec.rb
381
- - spec/api/apps_api_spec.rb
382
- - spec/api/connections_api_spec.rb
383
- - spec/api/cli_api_spec.rb
384
376
  - spec/api/api_keys_api_spec.rb
385
- - spec/api/triggers_api_spec.rb
386
377
  - spec/api_client_spec.rb
387
378
  - spec/configuration_spec.rb
388
- - spec/models/get_connections_response_dto_spec.rb
389
- - spec/models/proxy_execution_req_dto_spec.rb
390
- - spec/models/metadata_query_dto_spec.rb
391
- - spec/models/trigger_config_spec.rb
392
- - spec/models/trigger_response_dto_spec.rb
379
+ - spec/models/trigger_logs_res_dto_spec.rb
380
+ - spec/models/action_execution_req_dto_spec.rb
381
+ - spec/models/api_key_res_dto_spec.rb
382
+ - spec/models/add_tools_req_dto_spec.rb
383
+ - spec/models/connection_with_app_data_spec.rb
384
+ - spec/models/connector_list_item_dto_updated_at_spec.rb
385
+ - spec/models/action_log_data_spec.rb
386
+ - spec/models/type_spec.rb
387
+ - spec/models/actions_minimal_list_response_dto_spec.rb
388
+ - spec/models/user_git_user_info_spec.rb
393
389
  - spec/models/initiate_connection_response_spec.rb
394
- - spec/models/cli_query_dto_spec.rb
395
- - spec/models/page_info_dto_spec.rb
396
- - spec/models/time_spec.rb
390
+ - spec/models/app_query_dto_spec.rb
391
+ - spec/models/open_api_spec_list_res_dto_spec.rb
392
+ - spec/models/create_connector_payload_dto_spec.rb
393
+ - spec/models/connector_list_item_dto_spec.rb
394
+ - spec/models/connection_params_for_account_spec.rb
395
+ - spec/models/member_res_dto_spec.rb
396
+ - spec/models/metadata_query_dto_spec.rb
397
+ - spec/models/trigger_res_dto_spec.rb
398
+ - spec/models/add_repo_url_req_dto_spec.rb
399
+ - spec/models/connector_list_item_dto_created_at_spec.rb
400
+ - spec/models/app_info_response_dto_spec.rb
401
+ - spec/models/get_cli_session_res_dto_spec.rb
402
+ - spec/models/connection_with_app_data_created_at_spec.rb
397
403
  - spec/models/toggle_trigger_state_response_dto_spec.rb
398
- - spec/models/get_trigger_response_dto_spec.rb
399
- - spec/models/triggers_enabled_toggle_req_dto_spec.rb
400
- - spec/models/verify_magic_link_req_dto_spec.rb
401
- - spec/models/switch_trigger_status_params_dto_spec.rb
402
- - spec/models/action_execution_req_dto_spec.rb
403
- - spec/models/action_details_spec.rb
404
- - spec/models/connected_account_response_dto_spec.rb
405
- - spec/models/verify_cli_code_res_dto_spec.rb
406
404
  - spec/models/patch_connector_req_dto_spec.rb
407
- - spec/models/app_list_res_dto_spec.rb
405
+ - spec/models/generate_api_key_req_dto_spec.rb
406
+ - spec/models/action_execution_res_dto_spec.rb
407
+ - spec/models/meta_app_spec.rb
408
+ - spec/models/actions_query_dto_spec.rb
409
+ - spec/models/logout_res_dto_spec.rb
410
+ - spec/models/get_connections_response_dto_spec.rb
411
+ - spec/models/initiate_connection_payload_dto_spec.rb
408
412
  - spec/models/add_repo_url_res_dto_spec.rb
409
- - spec/models/app_query_dto_spec.rb
413
+ - spec/models/cli_query_dto_spec.rb
414
+ - spec/models/logs_res_dto_spec.rb
415
+ - spec/models/trigger_metadata_dto_spec.rb
416
+ - spec/models/track_client_res_dto_spec.rb
417
+ - spec/models/switch_trigger_status_body_dto_spec.rb
418
+ - spec/models/webhook_url_response_dto_spec.rb
419
+ - spec/models/delete_tools_res_dto_spec.rb
420
+ - spec/models/trigger_metadata_spec.rb
421
+ - spec/models/generate_cli_session_req_dto_spec.rb
422
+ - spec/models/get_active_triggers_query_dto_spec.rb
423
+ - spec/models/set_callback_url_body_dto_spec.rb
424
+ - spec/models/app_list_res_dto_spec.rb
425
+ - spec/models/status_spec.rb
426
+ - spec/models/trigger_config_spec.rb
427
+ - spec/models/verify_magic_link_res_dto_spec.rb
428
+ - spec/models/toggle_connected_account_response_dto_spec.rb
410
429
  - spec/models/metadata_req_dto_spec.rb
411
- - spec/models/delete_row_apidto_spec.rb
430
+ - spec/models/get_trigger_params_dto_spec.rb
431
+ - spec/models/verify_cli_code_res_dto_spec.rb
432
+ - spec/models/trigger_toggle_info_response_dto_spec.rb
412
433
  - spec/models/direct_execute_req_dto_spec.rb
434
+ - spec/models/create_connector_payload_dto_use_composio_auth_spec.rb
435
+ - spec/models/add_tools_request_dto_spec.rb
436
+ - spec/models/single_trigger_res_dto_spec.rb
437
+ - spec/models/active_trigger_instance_spec.rb
438
+ - spec/models/patch_connector_res_dto_spec.rb
439
+ - spec/models/action_details_minimal_spec.rb
440
+ - spec/models/trigger_log_data_spec.rb
441
+ - spec/models/enable_trigger_params_dto_spec.rb
442
+ - spec/models/delete_row_apidto_spec.rb
443
+ - spec/models/get_connector_info_res_dto_spec.rb
444
+ - spec/models/get_connector_list_res_dto_spec.rb
445
+ - spec/models/delete_api_key_req_dto_spec.rb
446
+ - spec/models/get_logs_dto_spec.rb
447
+ - spec/models/get_connections_result_spec.rb
448
+ - spec/models/track_client_req_dto_spec.rb
449
+ - spec/models/enable_trigger_body_dto_spec.rb
450
+ - spec/models/action_details_spec.rb
451
+ - spec/models/trigger_response_dto_spec.rb
452
+ - spec/models/meta_spec.rb
453
+ - spec/models/proxy_execution_req_dto_spec.rb
413
454
  - spec/models/o_auth2_callback_query_dto_spec.rb
414
- - spec/models/magic_link_res_dto_spec.rb
415
- - spec/models/auth_config_dto_spec.rb
416
- - spec/models/connector_list_item_dto_spec.rb
417
- - spec/models/actions_query_dto_spec.rb
418
455
  - spec/models/connection_params_spec.rb
456
+ - spec/models/trigger_metadata_type_spec.rb
457
+ - spec/models/connected_account_response_dto_spec.rb
458
+ - spec/models/tools_execute_req_dto_spec.rb
459
+ - spec/models/handle_trigger_body_dto_spec.rb
460
+ - spec/models/verify_magic_link_req_dto_spec.rb
461
+ - spec/models/switch_trigger_status_params_dto_spec.rb
419
462
  - spec/models/connection_params_headers_spec.rb
420
- - spec/models/enable_trigger_body_dto_spec.rb
421
- - spec/models/get_connector_info_res_dto_spec.rb
422
- - spec/models/get_active_triggers_query_dto_spec.rb
423
- - spec/models/generate_cli_session_req_dto_spec.rb
424
- - spec/models/actions_minimal_list_response_dto_spec.rb
463
+ - spec/models/get_logs_query_dto_spec.rb
464
+ - spec/models/page_info_spec.rb
465
+ - spec/models/auth_config_dto_spec.rb
466
+ - spec/models/triggers_enabled_toggle_res_dto_spec.rb
467
+ - spec/models/get_connections_query_dto_spec.rb
468
+ - spec/models/magic_link_res_dto_spec.rb
469
+ - spec/models/get_trigger_response_dto_spec.rb
470
+ - spec/models/page_info_dto_spec.rb
471
+ - spec/models/actions_list_response_dto_spec.rb
425
472
  - spec/models/handle_trigger_params_dto_spec.rb
426
- - spec/models/trigger_toggle_info_response_dto_spec.rb
427
- - spec/models/active_triggers_res_dto_spec.rb
473
+ - spec/models/generate_cli_session_res_dto_spec.rb
474
+ - spec/models/execute_action_res_dto_spec.rb
428
475
  - spec/models/list_triggers_query_dto_spec.rb
429
- - spec/models/logs_res_dto_spec.rb
430
- - spec/models/user_git_user_info_spec.rb
431
- - spec/models/job_status_spec.rb
432
- - spec/models/webhook_url_response_dto_spec.rb
433
- - spec/models/track_client_req_dto_spec.rb
434
- - spec/models/trigger_metadata_dto_spec.rb
435
- - spec/models/app_info_response_dto_spec.rb
436
- - spec/models/add_tools_req_dto_spec.rb
437
- - spec/models/api_key_res_dto_spec.rb
438
- - spec/models/add_tools_request_dto_spec.rb
439
- - spec/models/handle_trigger_body_dto_spec.rb
440
- - spec/models/single_app_info_res_dto_spec.rb
441
476
  - spec/models/identify_client_req_dto_spec.rb
442
- - spec/models/get_connector_list_res_dto_spec.rb
443
- - spec/models/type_spec.rb
444
- - spec/models/meta_app_spec.rb
477
+ - spec/models/delete_api_key_response_dto_spec.rb
445
478
  - spec/models/delete_tools_req_dto_spec.rb
446
- - spec/models/get_logs_dto_spec.rb
447
- - spec/models/magic_link_req_dto_spec.rb
448
- - spec/models/trigger_logs_res_dto_spec.rb
479
+ - spec/models/active_triggers_res_dto_spec.rb
480
+ - spec/models/redirect_uri_dto_spec.rb
449
481
  - spec/models/trigger_instance_params_dto_spec.rb
450
- - spec/models/active_trigger_instance_spec.rb
451
- - spec/models/initiate_connection_payload_dto_spec.rb
452
- - spec/models/tools_execute_req_dto_spec.rb
482
+ - spec/models/job_status_spec.rb
483
+ - spec/models/single_app_info_res_dto_spec.rb
484
+ - spec/models/magic_link_req_dto_spec.rb
485
+ - spec/models/trigger_log_item_dto_spec.rb
453
486
  - spec/models/actions_controller_v1_spec.rb
454
- - spec/models/connection_with_app_data_spec.rb
455
- - spec/models/invite_member_req_dto_spec.rb
456
- - spec/models/status_spec.rb
457
- - spec/models/get_logs_query_dto_spec.rb
458
- - spec/models/generate_cli_session_res_dto_spec.rb
459
- - spec/models/create_connector_payload_dto_spec.rb
460
- - spec/models/redirect_uri_dto_spec.rb
461
487
  - spec/models/action_metadata_type_spec.rb
462
- - spec/models/logout_res_dto_spec.rb
463
- - spec/models/get_cli_session_res_dto_spec.rb
464
- - spec/models/track_client_res_dto_spec.rb
465
- - spec/models/meta_spec.rb
466
- - spec/models/get_connections_result_spec.rb
488
+ - spec/models/verify_magic_link_data_dto_spec.rb
467
489
  - spec/models/action_metadata_spec.rb
468
- - spec/models/action_details_minimal_spec.rb
469
- - spec/models/connector_list_item_dto_created_at_spec.rb
470
- - spec/models/connection_params_for_account_spec.rb
490
+ - spec/models/triggers_enabled_toggle_req_dto_spec.rb
491
+ - spec/models/time_spec.rb
492
+ - spec/models/invite_member_req_dto_spec.rb
471
493
  - spec/models/identify_client_res_dto_spec.rb
472
- - spec/models/delete_tools_res_dto_spec.rb
473
- - spec/models/trigger_res_dto_spec.rb
474
- - spec/models/member_res_dto_spec.rb
475
- - spec/models/execute_action_res_dto_spec.rb
476
- - spec/models/action_log_data_spec.rb
477
- - spec/models/toggle_connected_account_response_dto_spec.rb
478
- - spec/models/trigger_log_item_dto_spec.rb
479
- - spec/models/generate_api_key_req_dto_spec.rb
480
- - spec/models/get_trigger_params_dto_spec.rb
481
- - spec/models/delete_api_key_req_dto_spec.rb
482
- - spec/models/trigger_metadata_spec.rb
483
- - spec/models/set_callback_url_body_dto_spec.rb
484
- - spec/models/connection_with_app_data_created_at_spec.rb
485
- - spec/models/enable_trigger_params_dto_spec.rb
486
- - spec/models/triggers_enabled_toggle_res_dto_spec.rb
487
- - spec/models/get_connections_query_dto_spec.rb
488
- - spec/models/connector_list_item_dto_updated_at_spec.rb
489
- - spec/models/delete_api_key_response_dto_spec.rb
490
- - spec/models/trigger_log_data_spec.rb
491
- - spec/models/switch_trigger_status_body_dto_spec.rb
492
- - spec/models/verify_magic_link_data_dto_spec.rb
493
- - spec/models/action_execution_res_dto_spec.rb
494
- - spec/models/page_info_spec.rb
495
- - spec/models/verify_magic_link_res_dto_spec.rb
496
- - spec/models/trigger_metadata_type_spec.rb
497
- - spec/models/patch_connector_res_dto_spec.rb
498
- - spec/models/single_trigger_res_dto_spec.rb
499
- - spec/models/open_api_spec_list_res_dto_spec.rb
500
- - spec/models/add_repo_url_req_dto_spec.rb
501
- - spec/models/actions_list_response_dto_spec.rb
502
- - spec/models/create_connector_payload_dto_use_composio_auth_spec.rb
503
494
  - spec/simple_test_spec.rb
504
495
  - spec/spec_helper.rb
@@ -1,266 +0,0 @@
1
- =begin
2
- #Composio OpenAPI
3
-
4
- #Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- =end
8
-
9
- require 'cgi'
10
-
11
- module Composio
12
- class CLIApi
13
- attr_accessor :api_client
14
-
15
- def initialize(api_client = ApiClient.default)
16
- @api_client = api_client
17
- end
18
-
19
- # Handle cli code exchange
20
- #
21
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
22
- def exchange_code(extra: {})
23
- api_response = exchange_code_with_http_info_impl(extra)
24
- api_response.data
25
- end
26
-
27
- # Handle cli code exchange
28
- #
29
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
30
- def exchange_code_with_http_info(extra: {})
31
- exchange_code_with_http_info_impl(extra)
32
- end
33
-
34
- # Handle cli code exchange
35
- # @param [Hash] opts the optional parameters
36
- # @return [GenerateCLISessionResDTO]
37
- private def exchange_code_impl(opts = {})
38
- data, _status_code, _headers = exchange_code_with_http_info(opts)
39
- data
40
- end
41
-
42
- # Handle cli code exchange
43
- # @param [Hash] opts the optional parameters
44
- # @return [APIResponse] data is GenerateCLISessionResDTO, status code, headers and response
45
- private def exchange_code_with_http_info_impl(opts = {})
46
- if @api_client.config.debugging
47
- @api_client.config.logger.debug 'Calling API: CLIApi.exchange_code ...'
48
- end
49
- # resource path
50
- local_var_path = '/api/v1/cli/generate-cli-session'
51
-
52
- # query parameters
53
- query_params = opts[:query_params] || {}
54
-
55
- # header parameters
56
- header_params = opts[:header_params] || {}
57
- # HTTP header 'Accept' (if needed)
58
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
-
60
- # form parameters
61
- form_params = opts[:form_params] || {}
62
-
63
- # http body (model)
64
- post_body = opts[:debug_body]
65
-
66
- # return_type
67
- return_type = opts[:debug_return_type] || 'GenerateCLISessionResDTO'
68
-
69
- # auth_names
70
- auth_names = opts[:debug_auth_names] || ['api_key']
71
-
72
- new_options = opts.merge(
73
- :operation => :"CLIApi.exchange_code",
74
- :header_params => header_params,
75
- :query_params => query_params,
76
- :form_params => form_params,
77
- :body => post_body,
78
- :auth_names => auth_names,
79
- :return_type => return_type
80
- )
81
-
82
- data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
83
- if @api_client.config.debugging
84
- @api_client.config.logger.debug "API called: CLIApi#exchange_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
- end
86
- APIResponse::new(data, status_code, headers, response)
87
- end
88
-
89
-
90
- # Get cli code
91
- #
92
- # @param key [String]
93
- # @param code [String]
94
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
95
- def get_code(key:, code: SENTINEL, extra: {})
96
- extra[:code] = code if code != SENTINEL
97
- api_response = get_code_with_http_info_impl(key, extra)
98
- api_response.data
99
- end
100
-
101
- # Get cli code
102
- #
103
- # @param key [String]
104
- # @param code [String]
105
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
106
- def get_code_with_http_info(key:, code: SENTINEL, extra: {})
107
- extra[:code] = code if code != SENTINEL
108
- get_code_with_http_info_impl(key, extra)
109
- end
110
-
111
- # Get cli code
112
- # @param key [String]
113
- # @param [Hash] opts the optional parameters
114
- # @option opts [String] :code
115
- # @return [GetCLISessionResDTO]
116
- private def get_code_impl(key, opts = {})
117
- data, _status_code, _headers = get_code_with_http_info(key, opts)
118
- data
119
- end
120
-
121
- # Get cli code
122
- # @param key [String]
123
- # @param [Hash] opts the optional parameters
124
- # @option opts [String] :code
125
- # @return [APIResponse] data is GetCLISessionResDTO, status code, headers and response
126
- private def get_code_with_http_info_impl(key, opts = {})
127
- if @api_client.config.debugging
128
- @api_client.config.logger.debug 'Calling API: CLIApi.get_code ...'
129
- end
130
- # verify the required parameter 'key' is set
131
- if @api_client.config.client_side_validation && key.nil?
132
- fail ArgumentError, "Missing the required parameter 'key' when calling CLIApi.get_code"
133
- end
134
- # resource path
135
- local_var_path = '/api/v1/cli/get-cli-code'
136
-
137
- # query parameters
138
- query_params = opts[:query_params] || {}
139
- query_params[:'key'] = key
140
- query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
141
-
142
- # header parameters
143
- header_params = opts[:header_params] || {}
144
- # HTTP header 'Accept' (if needed)
145
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
146
-
147
- # form parameters
148
- form_params = opts[:form_params] || {}
149
-
150
- # http body (model)
151
- post_body = opts[:debug_body]
152
-
153
- # return_type
154
- return_type = opts[:debug_return_type] || 'GetCLISessionResDTO'
155
-
156
- # auth_names
157
- auth_names = opts[:debug_auth_names] || ['api_key']
158
-
159
- new_options = opts.merge(
160
- :operation => :"CLIApi.get_code",
161
- :header_params => header_params,
162
- :query_params => query_params,
163
- :form_params => form_params,
164
- :body => post_body,
165
- :auth_names => auth_names,
166
- :return_type => return_type
167
- )
168
-
169
- data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
170
- if @api_client.config.debugging
171
- @api_client.config.logger.debug "API called: CLIApi#get_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
172
- end
173
- APIResponse::new(data, status_code, headers, response)
174
- end
175
-
176
-
177
- # Handle cli code verification
178
- #
179
- # @param key [String]
180
- # @param code [String]
181
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
182
- def verify_code(key:, code: SENTINEL, extra: {})
183
- extra[:code] = code if code != SENTINEL
184
- api_response = verify_code_with_http_info_impl(key, extra)
185
- api_response.data
186
- end
187
-
188
- # Handle cli code verification
189
- #
190
- # @param key [String]
191
- # @param code [String]
192
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
193
- def verify_code_with_http_info(key:, code: SENTINEL, extra: {})
194
- extra[:code] = code if code != SENTINEL
195
- verify_code_with_http_info_impl(key, extra)
196
- end
197
-
198
- # Handle cli code verification
199
- # @param key [String]
200
- # @param [Hash] opts the optional parameters
201
- # @option opts [String] :code
202
- # @return [VerifyCLICodeResDTO]
203
- private def verify_code_impl(key, opts = {})
204
- data, _status_code, _headers = verify_code_with_http_info(key, opts)
205
- data
206
- end
207
-
208
- # Handle cli code verification
209
- # @param key [String]
210
- # @param [Hash] opts the optional parameters
211
- # @option opts [String] :code
212
- # @return [APIResponse] data is VerifyCLICodeResDTO, status code, headers and response
213
- private def verify_code_with_http_info_impl(key, opts = {})
214
- if @api_client.config.debugging
215
- @api_client.config.logger.debug 'Calling API: CLIApi.verify_code ...'
216
- end
217
- # verify the required parameter 'key' is set
218
- if @api_client.config.client_side_validation && key.nil?
219
- fail ArgumentError, "Missing the required parameter 'key' when calling CLIApi.verify_code"
220
- end
221
- # resource path
222
- local_var_path = '/api/v1/cli/verify-cli-code'
223
-
224
- # query parameters
225
- query_params = opts[:query_params] || {}
226
- query_params[:'key'] = key
227
- query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
228
-
229
- # header parameters
230
- header_params = opts[:header_params] || {}
231
- # HTTP header 'Accept' (if needed)
232
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
233
-
234
- # form parameters
235
- form_params = opts[:form_params] || {}
236
-
237
- # http body (model)
238
- post_body = opts[:debug_body]
239
-
240
- # return_type
241
- return_type = opts[:debug_return_type] || 'VerifyCLICodeResDTO'
242
-
243
- # auth_names
244
- auth_names = opts[:debug_auth_names] || ['api_key']
245
-
246
- new_options = opts.merge(
247
- :operation => :"CLIApi.verify_code",
248
- :header_params => header_params,
249
- :query_params => query_params,
250
- :form_params => form_params,
251
- :body => post_body,
252
- :auth_names => auth_names,
253
- :return_type => return_type
254
- )
255
-
256
- data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
257
- if @api_client.config.debugging
258
- @api_client.config.logger.debug "API called: CLIApi#verify_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
259
- end
260
- APIResponse::new(data, status_code, headers, response)
261
- end
262
- end
263
-
264
- # top-level client access to avoid having the user to insantiate their own API instances
265
- CLI = CLIApi::new
266
- end