Skip to main content

payments.getStarsRevenueStats

Get Telegram Star revenue statistics ».

func (c *Client) PaymentsGetStarsRevenueStats(ctx context.Context, request *PaymentsGetStarsRevenueStatsRequest) (*PaymentsStarsRevenueStats, error)

Calling this method

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

res, err := api.PaymentsGetStarsRevenueStats(ctx, &tg.PaymentsGetStarsRevenueStatsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *PaymentsStarsRevenueStats
return nil
})

Parameters

NameTypeRequiredDescription
DarkboolWhether to enable dark theme for graph colors
TonboolIf set, fetches channel/bot ad revenue statistics in TON.
PeerInputPeerClassyesGet statistics for the specified bot, channel or ourselves (inputPeerSelf).

Returns

*PaymentsStarsRevenueStats

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References