Skip to main content

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

NameTypeRequiredDescription
AuctionInputStarGiftAuctionClassyesEither the ID of the gift linked to the auction, or an auction deep link slug ».
VersionintyesInitially 0, then set to the returned starGiftAuctionState.version, to avoid refetching results if they haven't changed.

Returns

*PaymentsStarGiftAuctionState

Possible errors

CodeTypeDescription
400STARGIFT_INVALIDThe passed gift is invalid.

References