xtrace_sdk.connectors.telegram_connector

Classes

TelegramConnector

This is the base class for a Connector.

Functions

main()

Module Contents

class xtrace_sdk.connectors.telegram_connector.TelegramConnector(api_id, api_hash, phone_number)

Bases: xtrace_sdk.connectors.base.ConnectorBase

This is the base class for a Connector. It provides an interface for connecting to various data sources.

Parameters:
  • api_id (str)

  • api_hash (str)

  • phone_number (str)

api_id
api_hash
phone_number
connect()

Establish a connection to the data source. This method should be implemented by subclasses to handle the specifics of connecting to the data source.

Return type:

None

async load_data(chat_username)

Load data from a specific folder in Google Drive.

Parameters:
  • folder_id (str) – The ID of the folder to load data from.

  • chat_username (str)

Returns:

A collection of documents loaded from the specified folder.

Return type:

DocumentCollection

async load_all_data()

Load messages from all chats and return a combined document collection.

Return type:

xtrace_sdk.utils.xtrace_types.DocumentCollection

async xtrace_sdk.connectors.telegram_connector.main()
Return type:

None