toloka.client.TolokaClient.find_user_bonuses
| Source code
Finds Tolokers' bonuses that match certain criteria.
The number of returned bonuses is limited. To find remaining bonuses call find_user_bonuses
with updated search criteria.
To iterate over all matching Tolokers' bonuses you may use the get_user_bonuses method.
Parameters | Type | Description |
---|---|---|
user_id | Optional[str] | The ID of a Toloker. |
assignment_id | Optional[str] | The ID of an assignment a bonus was granted for. |
private_comment | Optional[str] | Bonuses with specified comment. |
id_lt | Optional[str] | Bonuses with IDs less than the specified value. |
id_lte | Optional[str] | Bonuses with IDs less than or equal to the specified value. |
id_gt | Optional[str] | Bonuses with IDs greater than the specified value. |
id_gte | Optional[str] | Bonuses with IDs greater than or equal to the specified value. |
created_lt | Optional[datetime] | Bonuses given before the specified date. |
created_lte | Optional[datetime] | Bonuses given before or on the specified date. |
created_gt | Optional[datetime] | Bonuses given after the specified date. |
created_gte | Optional[datetime] | Bonuses given after or on the specified date. |
sort | Union[List[str], UserBonusSortItems, None] | Sorting options. Default: |
limit | Optional[int] | Returned Tolokers' bonuses limit. The maximum allowed value: 300. |
Returns:
Found Tolokers' bonuses and a flag showing whether there are more matching bonuses exceeding the limit.
Return type:
Examples:
find_result = toloka_client.find_user_bonuses( user_id='fac97860c7929add8048ed2ef63b66fd', sort=['-created', '-id'], limit=3)bonuses = find_result.items
Last updated: August 28, 2023