Link Search Menu Expand Document

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:

NameTypeDescriptionRequired
nextBoolIf 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
hiddenBoolIf set, fetches the hidden active story list, otherwise fetches the active story list, see here » for more info on the full flow.Optional
statestringIf 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', );