toloka.client.TolokaClient.create_user_bonuses_async
| Source code
Issues bonus payments to Tolokers asynchronously.
You can send a maximum of 10,000 requests of this kind per day.
Parameters | Type | Description |
---|---|---|
user_bonuses | List[UserBonus] | A list of bonuses. |
operation_id | Optional[UUID] | The UUID of the operation that conforms to the RFC4122 standard. The UUID is used if Specify UUID to avoid accidental errors like Toloka operation duplication caused by network problems. If you send several requests with the same |
async_mode | Optional[bool] | Request processing mode:
Default value: |
skip_invalid_items | Optional[bool] | Bonus validation option:
Default value: |
Returns:
An object to track the progress of the operation.
Return type:
Examples:
from decimal import Decimalnew_bonuses=[ toloka.client.UserBonus( user_id='fac97860c7929add8048ed2ef63b66fd', amount=Decimal('1.00'), public_title={'EN': 'Perfect job!'}, public_message={'EN': 'You are the best!'}, assignment_id='00001092da--61ef030400c684132d0da0de' ), toloka.client.UserBonus( user_id='a1b0b42923c429daa2c764d7ccfc364d', amount=Decimal('0.80'), public_title={'EN': 'Excellent work!'}, public_message={'EN': 'You have completed all tasks!'}, assignment_id='000015fccc--63bfc4c358d7a46c32a7b233' )]bonus_op = toloka_client.create_user_bonuses_async(new_bonuses)toloka_client.wait_operation(bonus_op)
Last updated: August 28, 2023