stories.getStoryViewsList
Obtain the list of users that have viewed a specific story we posted
func (c *Client) StoriesGetStoryViewsList(ctx context.Context, request *StoriesGetStoryViewsListRequest) (*StoriesStoryViewsList, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StoriesGetStoryViewsList(ctx, &tg.StoriesGetStoryViewsListRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StoriesStoryViewsList
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
JustContacts | bool | — | Whether to only fetch view reaction/views made by our contacts |
ReactionsFirst | 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. |
ForwardsFirst | bool | — | If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. |
Peer | InputPeerClass | yes | Peer where the story was posted |
Q | string | — | Search for specific peers |
ID | int | yes | Story ID |
Offset | string | yes | Offset for pagination, obtained from stories.storyViewsList.next_offset |
Limit | int | yes | Maximum number of results to return, see pagination |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | STORY_ID_INVALID | The specified story ID is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
stories.getStoryViewsList#7ed23c57