MadelineProtoDocs/docs/API_docs/methods/stats.getStoryStats.md
2024-05-01 14:53:46 +02:00

1.5 KiB

title description grand_parent parent image redirect_from
stats.getStoryStats Get [statistics](https://core.telegram.org/api/stats) for a certain [story](https://core.telegram.org/api/stories). Telegram RPC API Methods https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png /API_docs/methods/stats_getStoryStats.html

Method: stats.getStoryStats

Back to methods index

Get statistics for a certain story.

Parameters:

Name Type Description Required
dark Bool Whether to enable the dark theme for graph colors Optional
peer Username, chat ID, Update, Message or InputPeer The peer that posted the story Optional
id int Story ID Optional

Return type: stats.StoryStats

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

$stats_StoryStats = $MadelineProto->stats->getStoryStats(dark: $Bool, peer: $InputPeer, id: $int, );