Skip to main content

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

NameTypeRequiredDescription
DarkboolWhether to enable the dark theme for graph colors
PeerInputPeerClassyesThe peer that posted the story
IDintyesStory ID

Returns

*StatsStoryStats

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.
400STORIES_NEVER_CREATEDThis peer hasn't ever posted any stories.

References