Toloka documentation

UserRestrictionSortItems

toloka.client.search_requests.UserRestrictionSortItems

UserRestrictionSortItems(self, items=None)

Keys for sorting Toloker restrictions in search results.

Parameters Description

Parameters Type Description
items Optional[List[SortItem]]

A list of sorting keys. Supported values:

  • 'id' — The ID of a restriction.
  • 'created' — The restriction creation date.

Examples:

The example shows how to find Toloker restrictions sorted by creation date in descending order. Restrictions with equal creation dates are sorted by IDs in ascending order.

sort = toloka.client.search_requests.UserRestrictionSortItems(['-created', 'id'])
result = toloka_client.find_user_restrictions(pool_id=my_pretty_pool_id, sort=sort, limit=10)