Skip to main content

stats.loadAsyncGraph

Load channel statistics graph asynchronously

func (c *Client) StatsLoadAsyncGraph(ctx context.Context, request *StatsLoadAsyncGraphRequest) (StatsGraphClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.StatsLoadAsyncGraph(ctx, &tg.StatsLoadAsyncGraphRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // StatsGraphClass
return nil
})

Parameters

NameTypeRequiredDescription
TokenstringyesGraph token from statsGraphAsync constructor
Xint64Zoom value, if required

Returns

StatsGraphClass

Possible errors

CodeTypeDescription
400GRAPH_EXPIRED_RELOADThis graph has expired, please obtain a new graph token.
400GRAPH_INVALID_RELOADInvalid graph token provided, please reload the stats and provide the updated token.
400GRAPH_OUTDATED_RELOADThe graph is outdated, please get a new async token using stats.getBroadcastStats.

References