toloka.client.TolokaClient.find_user_bonuses
| Source code
Finds Tolokers' rewards that match certain criteria.
The number of returned rewards is limited. To find remaining rewards call find_user_bonuses
with updated search criteria.
To iterate over all matching Tolokers' rewards 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 reward was granted for. |
private_comment | Optional[str] | Rewards with specified comment. |
id_lt | Optional[str] | Rewards with IDs less than the specified value. |
id_lte | Optional[str] | Rewards with IDs less than or equal to the specified value. |
id_gt | Optional[str] | Rewards with IDs greater than the specified value. |
id_gte | Optional[str] | Rewards with IDs greater than or equal to the specified value. |
created_lt | Optional[datetime] | Rewards given before the specified date. |
created_lte | Optional[datetime] | Rewards given before or on the specified date. |
created_gt | Optional[datetime] | Rewards given after the specified date. |
created_gte | Optional[datetime] | Rewards given after or on the specified date. |
sort | Union[List[str], UserBonusSortItems, None] | Sorting options. Default: |
limit | Optional[int] | Returned Tolokers' rewards limit. The maximum allowed limit is 300. |
Returns:
Found Tolokers' rewards and a flag showing whether there are more matching rewards exceeding the limit.
Return type:
Examples:
toloka_client.find_user_bonuses(user_id='1', sort=['-created', '-id'], limit=3)