stats.getStoryStats
Get statistics for a certain story.
func (c *Client) StatsGetStoryStats(ctx context.Context, request *StatsGetStoryStatsRequest) (*StatsStoryStats, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StatsGetStoryStats(ctx, &tg.StatsGetStoryStatsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StatsStoryStats
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Dark | bool | — | Whether to enable the dark theme for graph colors |
Peer | InputPeerClass | yes | The peer that posted the story |
ID | int | yes | Story ID |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | STORIES_NEVER_CREATED | This peer hasn't ever posted any stories. |
References
- Official documentation
- Generated Go reference
- TL definition:
stats.getStoryStats#374fef40