Method: 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.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
sort_by_price | Bool | Sort gifts by price (ascending). | Optional |
sort_by_num | Bool | Sort gifts by number (ascending). | Optional |
attributes_hash | long | 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. | Optional |
gift_id | long | Mandatory identifier of the base gift from which the collectible gift was upgraded. | Yes |
attributes | Array of StarGiftAttributeId | Optionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed. | Optional |
offset | string | 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. | Optional |
limit | int | Maximum number of results to return, see pagination | Optional |
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, );