newtask endpoint for pbclient API#34
Conversation
|
Forgot to write test. Update will come soon |
|
We never add it because we use that only from the front end :-) Good add! Once the tests pass, we will merge it and publish it. Please, increase the version number as well on the setup.py file. |
|
We want to launch pybossa as a service, so we need to upgrade the client to cover most of the API. Do you think I should increase the version for each PR? And which part of the version? |
|
This one is a minor improvement, so go for x.x.Y :-) Then, if you change anything big, we can move it into x.X.x and if we do something muuuch bigger into X.x.x. |
|
Please, don't rush with merging it. I made some enhancements. BTW the coveralls isn't in rush anyway 🤣 |
|
Yes, Coveralls usually goes really slow or returns something not good. In any case, we keep it as a way of reviewing if we miss something important. |
| raise | ||
|
|
||
|
|
||
| def get_new_task(project_id, limit=1, offset=0, last_id=None): |
There was a problem hiding this comment.
I decided to drop params: limit, offset and last_id. These parameters are relevant only for getting multiple tasks. It just doesn't apply when you want to get a random task.
There was a problem hiding this comment.
I need your opinion on this one: is it desired use case to send multiple new tasks at once?
There was a problem hiding this comment.
Yes. It will be nice to add it. Basically think about this of getting a bunch of tasks for your user with only one request. It will save time and you can cache them.
|
Heya! |
Missing enpoint in pbclient API is getting a new task, selected by pybossa. Very similar to get tasks list