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(
category: Optional[str] = None,
page: int = 1,
limit: int = 1000,
sort: str = "desc",
) -> Dict[str, Any]
Get Telegram supported channels
GET /api/v1/telegram/channels
https://docs.datamaxiplus.com/rest/telegram/channels
Parameters:
-
category
(str
, default:None
) –channel category
-
page
(int
, default:1
) –Page number
-
limit
(int
, default:1000
) –Limit of data
-
sort
(str
, default:'desc'
) –Sort order
Returns:
-
Dict[str, Any]
–List of supported Telegram channels
posts
¶
posts(
channel_name: Optional[str] = None,
page: int = 1,
limit: int = 1000,
sort: str = "desc",
) -> Dict[str, Any]
Get Telegram posts for given channel username
GET /api/v1/telegram/posts
https://docs.datamaxiplus.com/rest/telegram/posts
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
-
sort
(str
, default:'desc'
) –Sort order
Returns:
-
Dict[str, Any]
–Telegram channel posts