Layer 220
PaymentsGetResaleStarGifts
Get collectible gifts of a specific type currently on resale, see here for more info.
method
Users
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| SortByPrice | flags.1?true | Sort gifts by price (ascending). |
| SortByNum | flags.2?true | Sort gifts by number (ascending). |
| AttributesHash | flags.0?long | If a previous call to the method was made and payments. resale Star Gifts. attributes_hash was set, pass it here to avoid returning any results if they haven't changed. Otherwise, set this flag and pass 0 to return payments. resale Star Gifts. attributes_hash and payments. resale Star Gifts. attributes, these two fields will not be set if this flag is not set. |
| GiftId | long | Mandatory identifier of the base gift from which the collectible gift was upgraded. |
| Attributes | Vector<StarGiftAttributeId> | Optionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed. |
| Offset | string | Offset for pagination. If not equal to an empty string, payments. resale Star Gifts. counters will not be set to avoid returning the counters every time a new page is fetched. |
| Limit | int | Maximum number of results to return, see pagination |
Returns
payments.ResaleStarGiftsPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | STARGIFT_INVALID | The passed gift is invalid. |
Gogram Example
// PaymentsGetResaleStarGifts - using Params struct result, err := client.PaymentsGetResaleStarGifts(&tg.PaymentsGetResaleStarGiftsParams{ GiftId: int64(0), Offset: "...", Limit: 0, // Optional fields: // SortByPrice: true, // SortByNum: true, // AttributesHash: int64(0), // Attributes: []tg.StarGiftAttributeId{&tg.StarGiftAttributeId{}}, }) if err != nil { // handle error } // result is *tg.PaymentsResaleStarGifts