Layer 227
StarGiftAuctionStateObj
Represents an active or pending auction.
constructor
starGiftAuctionState#771a4e66 version:int start_date:int end_date:int min_bid_amount:long bid_levels:Vector<AuctionBidLevel> top_bidders:Vector<long> next_round_at:int last_gift_num:int gifts_left:int current_round:int total_rounds:int rounds:Vector<StarGiftAuctionRound> = StarGiftAuctionState;
Parameters
| Name | Type | Description |
|---|---|---|
| Version | int | Only apply incoming star Gift Auction State constructors if the received version is bigger than the locally cached version. |
| StartDate | int | UNIX timestamp indicating when the auction will start (or when it started, if it's in the past). |
| EndDate | int | UNIX timestamp indicating when the auction will end |
| MinBidAmount | long | Minumum allowed bid amount in Telegram Stars: only applicable if the user hasn't made a bid yet, otherwise must be overridden to the value of star Gift Auction User State. min_bid_amount (which will be set if and only if the user already made a bid to this auction). |
| BidLevels | Vector < AuctionBidLevel > | Contains a sparse list of bids starting from the top bids, a more detailed description is available in the docs. |
| TopBidders | Vector < long > | User IDs of the top 3 bidders (the user constructors will be returned as min constructors in the containing object). |
| NextRoundAt | int | UNIX timestamp indicating when the current auction round will end, distributing star Gift. gifts_per_round gifts to the top star Gift. gifts_per_round bidders. |
| LastGiftNum | int | The number of gifts that were distributed in the previous round (also used to compute the approximated index of the gift that the current user will receive, last_gift_num + approx_pos, see here for more info). |
| GiftsLeft | int | The remaining number of gifts that are yet to be distributed. |
| CurrentRound | int | The current round number (starting from 1). |
| TotalRounds | int | The total number of rounds in this auction. |
| Rounds | Vector < StarGiftAuctionRound > | Detailed round information. |
Returns
StarGiftAuctionStateGogram Example
// Creating StarGiftAuctionStateObj constructor obj := &tg.StarGiftAuctionStateObj{ Version: 42, StartDate: 42, EndDate: 42, MinBidAmount: int64(1234567890), BidLevels: &tg.VectorAuctionBidLevel{}, TopBidders: &tg.VectorLong{}, // ... more required fields }