Layer 227
PaymentsGetResaleStarGifts
Get collectible gifts of a specific type currently on resale, see here for more info.
method
Users
payments.getResaleStarGifts#7a5fa236 flags:# sort_by_price:flags.1?true sort_by_num:flags.2?true for_craft:flags.4?true stars_only:flags.5?true attributes_hash:flags.0?long gift_id:long attributes:flags.3?Vector<StarGiftAttributeId> offset:string limit:int = payments.ResaleStarGifts;
Parameters
| Name | Type | Description |
|---|---|---|
| SortByPrice | flags .1? true | Sort gifts by price (ascending). |
| SortByNum | flags .2? true | Sort gifts by number (ascending). |
| ForCraft | flags .4? true | Only return collectible gifts that can be bought and used for crafting; render each returned gift's star Gift Unique. craft_chance_permille as its crafting success contribution. |
| StarsOnly | flags .5? true | Only return gifts that can be bought using Stars. |
| 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 | flags .3? 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.ResaleStarGiftsGogram Example
// PaymentsGetResaleStarGifts - using Params struct result, err := client.PaymentsGetResaleStarGifts(&tg.PaymentsGetResaleStarGiftsParams{ SortByPrice: nil, SortByNum: nil, ForCraft: nil, StarsOnly: nil, AttributesHash: nil, GiftId: int64(1234567890), Attributes: nil, Offset: "Hello, World!", // ... }) if err != nil { // handle error } // result is *tg.PaymentsResaleStarGifts
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | STARGIFT_ATTRIBUTE_INVALID | One of the specified star gift attributes is invalid. |
| 400 | STARGIFT_INVALID | The passed gift is invalid. |