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

2.4 KiB

title description grand_parent parent image redirect_from
stories.getAllStories Fetch the List of active (or active and hidden) stories, see [here »](https://core.telegram.org/api/stories#watching-stories) for more info on watching stories. Telegram RPC API Methods https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png /API_docs/methods/stories_getAllStories.html

Method: stories.getAllStories

Back to methods index

Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories.

Parameters:

Name Type Description Required
next Bool If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow. Optional
hidden Bool If set, fetches the hidden active story list, otherwise fetches the active story list, see here » for more info on the full flow. Optional
state string If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow. Optional

Return type: stories.AllStories

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();

$stories_AllStories = $MadelineProto->stories->getAllStories(next: $Bool, hidden: $Bool, state: 'string', );