mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-11-26 20:35:03 +01:00
2.7 KiB
2.7 KiB
title | description | grand_parent | parent | image | redirect_from |
---|---|---|---|---|---|
stories.getStoryViewsList | Obtain the list of users that have viewed a specific [story we posted](https://core.telegram.org/api/stories) | Telegram RPC API | Methods | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png | /API_docs/methods/stories_getStoryViewsList.html |
Method: stories.getStoryViewsList
Obtain the list of users that have viewed a specific story we posted
Parameters:
Name | Type | Description | Required |
---|---|---|---|
just_contacts | Bool | Whether to only fetch view reaction/views made by our contacts | Optional |
reactions_first | Bool | Whether to return storyView info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting storyViews with an associated reaction first in the list). Ignored if forwards_first is set. |
Optional |
forwards_first | Bool | If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. | Optional |
peer | Username, chat ID, Update, Message or InputPeer | Peer where the story was posted | Optional |
q | string | Search for specific peers | Optional |
id | int | Story ID | Optional |
offset | string | Offset for pagination, obtained from stories.storyViewsList.next_offset |
Optional |
limit | int | Maximum number of results to return, see pagination | Optional |
Return type: stories.StoryViewsList
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_StoryViewsList = $MadelineProto->stories->getStoryViewsList(just_contacts: $Bool, reactions_first: $Bool, forwards_first: $Bool, peer: $InputPeer, q: 'string', id: $int, offset: 'string', limit: $int, );