Skip to main content

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

NameTypeRequiredDescription
SortByPriceboolSort gifts by price (ascending).
SortByNumboolSort gifts by number (ascending).
ForCraftboolOnly 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.
StarsOnlyboolOnly return gifts that can be bought using Stars.
AttributesHashint64If 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.
GiftIDint64yesMandatory identifier of the base gift from which the collectible gift was upgraded.
Attributes[]StarGiftAttributeIDClassOptionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed.
OffsetstringyesOffset 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.
LimitintyesMaximum number of results to return, see pagination

Returns

*PaymentsResaleStarGifts

Possible errors

CodeTypeDescription
400STARGIFT_ATTRIBUTE_INVALID
400STARGIFT_INVALIDThe passed gift is invalid.

References