Toloka documentation

get_user_bonuses

toloka.client.TolokaClient.get_user_bonuses

Finds all user bonuses that match certain rules and returns them in an iterable object

Unlike find_user_bonuses, returns generator. Does not sort user bonuses. While iterating over the result, several requests to the Toloka server is possible.

Parameters Description

Parameters Type Description
user_id Optional[str]

Performer ID.

assignment_id Optional[str]

ID of the performer's response to the task a reward is issued for.

private_comment Optional[str]

Comments for the requester.

id_lt Optional[str]

Bonuses with an ID less than the specified value.

id_lte Optional[str]

Bonuses with an ID less than or equal to the specified value.

id_gt Optional[str]

Bonuses with an ID greater than the specified value.

id_gte Optional[str]

Bonuses with an ID greater than or equal to the specified value.

created_lt Optional[datetime]

Bonuses awarded before the specified date.

created_lte Optional[datetime]

Bonuses awarded before or on the specified date.

created_gt Optional[datetime]

Bonuses awarded after the specified date.

created_gte Optional[datetime]

Bonuses awarded after or on the specified date.

  • Yields:

    The next object corresponding to the request parameters.

  • Yield type:

    Generator[UserBonus, None, None]

Examples:

bonuses = [bonus for bonus in toloka_client.get_user_bonuses(created_lt='2021-06-01T00:00:00')]