payments.getStarGiftAuctionState
Returns info about a collectible gift auction »; also subscribes the user to auction updates, see here » for more info on the full flow.
func (c *Client) PaymentsGetStarGiftAuctionState(ctx context.Context, request *PaymentsGetStarGiftAuctionStateRequest) (*PaymentsStarGiftAuctionState, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsGetStarGiftAuctionState(ctx, &tg.PaymentsGetStarGiftAuctionStateRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *PaymentsStarGiftAuctionState
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Auction | InputStarGiftAuctionClass | yes | Either the ID of the gift linked to the auction, or an auction deep link slug ». |
Version | int | yes | Initially 0, then set to the returned starGiftAuctionState.version, to avoid refetching results if they haven't changed. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | STARGIFT_INVALID | The passed gift is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getStarGiftAuctionState#5c9ff4d6