find_user_bonuses

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 Description

ParametersTypeDescription
user_idOptional[str]

The ID of a Toloker.

assignment_idOptional[str]

The ID of an assignment a reward was granted for.

private_commentOptional[str]

Rewards with specified comment.

id_ltOptional[str]

Rewards with IDs less than the specified value.

id_lteOptional[str]

Rewards with IDs less than or equal to the specified value.

id_gtOptional[str]

Rewards with IDs greater than the specified value.

id_gteOptional[str]

Rewards with IDs greater than or equal to the specified value.

created_ltOptional[datetime]

Rewards given before the specified date.

created_lteOptional[datetime]

Rewards given before or on the specified date.

created_gtOptional[datetime]

Rewards given after the specified date.

created_gteOptional[datetime]

Rewards given after or on the specified date.

sortUnion[List[str], UserBonusSortItems, None]

Sorting options. Default: None.

limitOptional[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:

    UserBonusSearchResult

Examples:

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