find_user_bonuses

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 description

ParametersTypeDescription
user_idOptional[str]

The ID of a Toloker.

assignment_idOptional[str]

The ID of an assignment a bonus was granted for.

private_commentOptional[str]

Bonuses with specified comment.

id_ltOptional[str]

Bonuses with IDs less than the specified value.

id_lteOptional[str]

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

id_gtOptional[str]

Bonuses with IDs greater than the specified value.

id_gteOptional[str]

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

created_ltOptional[datetime]

Bonuses given before the specified date.

created_lteOptional[datetime]

Bonuses given before or on the specified date.

created_gtOptional[datetime]

Bonuses given after the specified date.

created_gteOptional[datetime]

Bonuses given after or on the specified date.

sortUnion[List[str], UserBonusSortItems, None]

Sorting options. Default: None.

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

    UserBonusSearchResult

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

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming