Requesting a task
You can request a new task for the current user (anonymous or authenticated) by:
1 |
|
This will return a domain Task object in JSON format if there is a task available for the user. Otherwise, it will return None.
You can also use limit to get more than 1 task for the user like this:
1 |
|
That query will return 100 tasks for the user.
Note
That’s the maximum of tasks that a user can get at once. If you pass an argument of 200, PYBOSSA will convert it to 100.
You can also, use offset to get the next tasks, if you want, allowing you to preload:
1 |
|
That query will return the next task for the user, once it solves the previous task.
Both arguments, limit and offset can be used together:
1 |
|
That will load the next two tasks for the user.
Also, you can request the tasks to be sorted by a Task attribute (like ID, created, etc.) using the following arguments: orderby and desc to sort them in descending order:
1 |
|
That query will return the tasks order by priority in descending order, in other words, it will return first the tasks with higher priority.