Link Search Menu Expand Document

Method: payments.getResaleStarGifts

Back to methods index

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.

Parameters:

NameTypeDescriptionRequired
sort_by_priceBoolSort gifts by price (ascending).Optional
sort_by_numBoolSort gifts by number (ascending).Optional
attributes_hashlongIf 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.
Optional
gift_idlongMandatory identifier of the base gift from which the collectible gift was upgraded.Yes
attributesArray of StarGiftAttributeIdOptionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed.Optional
offsetstringOffset 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.Optional
limitintMaximum number of results to return, see paginationOptional

Return type: payments.ResaleStarGifts

Can users use this method: YES

Can bots use this method: NO

Can bots use this method over a business connection with the businessConnectionId flag: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

$payments_ResaleStarGifts = $MadelineProto->payments->getResaleStarGifts(sort_by_price: $Bool, sort_by_num: $Bool, attributes_hash: $long, gift_id: $long, attributes: [$StarGiftAttributeId, $StarGiftAttributeId], offset: 'string', limit: $int, );