Class: Composio::IntegrationsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ IntegrationsApi

Returns a new instance of IntegrationsApi.



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

def api_client
  @api_client
end

Instance Method Details

#create_integration(name:, auth_scheme: SENTINEL, auth_config: SENTINEL, use_composio_auth: SENTINEL, app_id: SENTINEL, app_name: SENTINEL, force_new_integration: SENTINEL, extra: {}) ⇒ Object

Create connector

Create a new connector

Parameters:

  • name (String)

    Name of the connector

  • auth_scheme (String) (defaults to: SENTINEL)

    Authentication scheme

  • auth_config (AuthConfigDTO) (defaults to: SENTINEL)
  • use_composio_auth (CreateConnectorPayloadDTOUseComposioAuth) (defaults to: SENTINEL)
  • app_id (String) (defaults to: SENTINEL)

    Composio App UUID to be used for authentication. Either specify this or appName

  • app_name (String) (defaults to: SENTINEL)

    Name of the app to be used for authentication. Either specify this or appId

  • force_new_integration (Boolean) (defaults to: SENTINEL)

    Flag to force new integration

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

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



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/composio/api/integrations_api.rb', line 32

def create_integration(name:, auth_scheme: SENTINEL, auth_config: SENTINEL, use_composio_auth: SENTINEL, app_id: SENTINEL, app_name: SENTINEL, force_new_integration: SENTINEL, extra: {})
  _body = {}
  _body[:name] = name if name != SENTINEL
  _body[:authScheme] = auth_scheme if auth_scheme != SENTINEL
  _body[:authConfig] = auth_config if auth_config != SENTINEL
  _body[:useComposioAuth] = use_composio_auth if use_composio_auth != SENTINEL
  _body[:appId] = app_id if app_id != SENTINEL
  _body[:appName] = app_name if app_name != SENTINEL
  _body[:forceNewIntegration] = force_new_integration if force_new_integration != SENTINEL
  extra[:create_connector_payload_dto] = _body if !_body.empty?
  api_response = create_integration_with_http_info_impl(extra)
  api_response.data
end

#create_integration_with_http_info(name:, auth_scheme: SENTINEL, auth_config: SENTINEL, use_composio_auth: SENTINEL, app_id: SENTINEL, app_name: SENTINEL, force_new_integration: SENTINEL, extra: {}) ⇒ Object

Create connector

Create a new connector

Parameters:

  • name (String)

    Name of the connector

  • auth_scheme (String) (defaults to: SENTINEL)

    Authentication scheme

  • auth_config (AuthConfigDTO) (defaults to: SENTINEL)
  • use_composio_auth (CreateConnectorPayloadDTOUseComposioAuth) (defaults to: SENTINEL)
  • app_id (String) (defaults to: SENTINEL)

    Composio App UUID to be used for authentication. Either specify this or appName

  • app_name (String) (defaults to: SENTINEL)

    Name of the app to be used for authentication. Either specify this or appId

  • force_new_integration (Boolean) (defaults to: SENTINEL)

    Flag to force new integration

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

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



59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/composio/api/integrations_api.rb', line 59

def create_integration_with_http_info(name:, auth_scheme: SENTINEL, auth_config: SENTINEL, use_composio_auth: SENTINEL, app_id: SENTINEL, app_name: SENTINEL, force_new_integration: SENTINEL, extra: {})
  _body = {}
  _body[:name] = name if name != SENTINEL
  _body[:authScheme] = auth_scheme if auth_scheme != SENTINEL
  _body[:authConfig] = auth_config if auth_config != SENTINEL
  _body[:useComposioAuth] = use_composio_auth if use_composio_auth != SENTINEL
  _body[:appId] = app_id if app_id != SENTINEL
  _body[:appName] = app_name if app_name != SENTINEL
  _body[:forceNewIntegration] = force_new_integration if force_new_integration != SENTINEL
  extra[:create_connector_payload_dto] = _body if !_body.empty?
  create_integration_with_http_info_impl(extra)
end

#delete_connector(integration_id:, extra: {}) ⇒ Object

Delete connector

Delete a connector

Parameters:

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

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



143
144
145
146
# File 'lib/composio/api/integrations_api.rb', line 143

def delete_connector(integration_id:, extra: {})
  api_response = delete_connector_with_http_info_impl(integration_id, extra)
  api_response.data
end

#delete_connector_with_http_info(integration_id:, extra: {}) ⇒ Object

Delete connector

Delete a connector

Parameters:

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

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



154
155
156
# File 'lib/composio/api/integrations_api.rb', line 154

def delete_connector_with_http_info(integration_id:, extra: {})
  delete_connector_with_http_info_impl(integration_id, extra)
end

#get_connector_info(integration_id:, extra: {}) ⇒ Object

Get connector info

Get connector info

Parameters:

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

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



233
234
235
236
# File 'lib/composio/api/integrations_api.rb', line 233

def get_connector_info(integration_id:, extra: {})
  api_response = get_connector_info_with_http_info_impl(integration_id, extra)
  api_response.data
end

#get_connector_info_with_http_info(integration_id:, extra: {}) ⇒ Object

Get connector info

Get connector info

Parameters:

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

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



244
245
246
# File 'lib/composio/api/integrations_api.rb', line 244

def get_connector_info_with_http_info(integration_id:, extra: {})
  get_connector_info_with_http_info_impl(integration_id, extra)
end

#list_global_connectors(page: SENTINEL, page_size: SENTINEL, extra: {}) ⇒ Object

List all connectors

Parameters:

  • page (Float) (defaults to: SENTINEL)
  • page_size (Float) (defaults to: SENTINEL)
  • extra (Hash) (defaults to: {})

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



322
323
324
325
326
327
328
# File 'lib/composio/api/integrations_api.rb', line 322

def list_global_connectors(page: SENTINEL, page_size: SENTINEL,  extra: {})
  extra[:page] = page if page != SENTINEL
  extra[:page_size] = page_size if page_size != SENTINEL

  api_response = list_global_connectors_with_http_info_impl(extra)
  api_response.data
end

#list_global_connectors_with_http_info(extra: {}) ⇒ Object

List all connectors

List all connectors

Parameters:

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

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



335
336
337
# File 'lib/composio/api/integrations_api.rb', line 335

def list_global_connectors_with_http_info(extra: {})
  list_global_connectors_with_http_info_impl(extra)
end

#update_integration(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {}) ⇒ Object

Modify connector

Modify a connector

Parameters:

  • integration_id (String)
  • auth_config (Object) (defaults to: SENTINEL)

    Authentication configuration for the connector

  • enabled (Boolean) (defaults to: SENTINEL)

    Flag to indicate if the connector is enabled

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

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



410
411
412
413
414
415
416
417
# File 'lib/composio/api/integrations_api.rb', line 410

def update_integration(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {})
  _body = {}
  _body[:authConfig] = auth_config if auth_config != SENTINEL
  _body[:enabled] = enabled if enabled != SENTINEL
  extra[:patch_connector_req_dto] = _body if !_body.empty?
  api_response = update_integration_with_http_info_impl(integration_id, extra)
  api_response.data
end

#update_integration_with_http_info(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {}) ⇒ Object

Modify connector

Modify a connector

Parameters:

  • integration_id (String)
  • auth_config (Object) (defaults to: SENTINEL)

    Authentication configuration for the connector

  • enabled (Boolean) (defaults to: SENTINEL)

    Flag to indicate if the connector is enabled

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

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



428
429
430
431
432
433
434
# File 'lib/composio/api/integrations_api.rb', line 428

def update_integration_with_http_info(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {})
  _body = {}
  _body[:authConfig] = auth_config if auth_config != SENTINEL
  _body[:enabled] = enabled if enabled != SENTINEL
  extra[:patch_connector_req_dto] = _body if !_body.empty?
  update_integration_with_http_info_impl(integration_id, extra)
end