Telegram¶
Telegram
¶
Telegram(api_key=None, **kwargs: Any)
Bases: API
Client to fetch Telegram data from DataMaxi+ API.
Parameters:
-
api_key
(str
, default:None
) –The DataMaxi+ API key
-
**kwargs
(Any
, default:{}
) –Keyword arguments used by
datamaxi.api.API
.
channels
¶
channels(
page: int = 1,
limit: int = 1000,
category: Optional[str] = None,
key: Optional[str] = None,
sort: str = "desc",
) -> Dict[str, Any]
Get Telegram supported channels
GET /api/v1/telegram/channels
https://docs.datamaxiplus.com/rest/telegram/channels
Parameters:
-
page
(int
, default:1
) –Page number
-
limit
(int
, default:1000
) –Limit of data
-
category
(str
, default:None
) –channel category
-
key
(str
, default:None
) –Specifies key to sort by
-
sort
(str
, default:'desc'
) –Sort order
Returns:
-
Dict[str, Any]
–List of supported Telegram channels
messages
¶
messages(
channel_name: Optional[str] = None,
page: int = 1,
limit: int = 1000,
key: Optional[str] = None,
sort: str = "desc",
category: Optional[str] = None,
) -> Dict[str, Any]
Get Telegram posts for given channel username
GET /api/v1/telegram/messages
https://docs.datamaxiplus.com/rest/telegram/messages
Parameters:
-
channel_name
(str
, default:None
) –channel name to get posts from
-
page
(int
, default:1
) –Page number
-
limit
(int
, default:1000
) –Limit of data
-
key
(str
, default:None
) –Specifies key to sort by
-
sort
(str
, default:'desc'
) –Sort order
-
category
(str
, default:None
) –Specifies category
Returns:
-
Dict[str, Any]
–Telegram channel posts