payments.getResaleStarGifts
Get collectible gifts of a specific type currently on resale, see here » for more info. sort_by_price and sort_by_num are mutually exclusive, if neither are set results are sorted by the unixtime (descending) when their resell price was last changed. See here » for detailed documentation on this method.
func (c *Client) PaymentsGetResaleStarGifts(ctx context.Context, request *PaymentsGetResaleStarGiftsRequest) (*PaymentsResaleStarGifts, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsGetResaleStarGifts(ctx, &tg.PaymentsGetResaleStarGiftsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *PaymentsResaleStarGifts
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
SortByPrice | bool | — | Sort gifts by price (ascending). |
SortByNum | bool | — | Sort gifts by number (ascending). |
ForCraft | bool | — | Only return collectible gifts that can be bought and used for crafting »; render each returned gift's starGiftUnique.craft_chance_permille as its crafting success contribution. |
StarsOnly | bool | — | Only return gifts that can be bought using Stars. |
AttributesHash | int64 | — | If a previous call to the method was made and payments.resaleStarGifts 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.resaleStarGifts attributes_hash and payments.resaleStarGifts.attributes, these two fields will not be set if this flag is not set. |
GiftID | int64 | yes | Mandatory identifier of the base gift from which the collectible gift was upgraded. |
Attributes | []StarGiftAttributeIDClass | — | 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 | yes | Offset for pagination. If not equal to an empty string, payments.resaleStarGifts counters will not be set to avoid returning the counters every time a new page is fetched. |
Limit | int | yes | Maximum number of results to return, see pagination |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | STARGIFT_ATTRIBUTE_INVALID | |
| 400 | STARGIFT_INVALID | The passed gift is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getResaleStarGifts#7a5fa236