UserBonusSortItems

toloka.client.search_requests.UserBonusSortItems

UserBonusSortItems(self, items=None)

Keys for sorting rewards in search results.

Parameters Description

ParametersTypeDescription
itemsOptional[List[SortItem]]

A list of sorting keys. Supported values:

  • 'id' — The ID of a reward.
  • 'created' — The date of granting a reward.

Examples:

The example shows how to find rewards sorted by granting date in descending order. Rewards with equal granting dates are sorted by IDs in ascending order.

sort = toloka.client.search_requests.UserBonusSortItems(['-created', 'id'])
result = toloka_client.find_user_bonuses(user_id=best_toloker_id, sort=sort, limit=10)
Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming