Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newtask endpoint for pbclient API #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

newtask endpoint for pbclient API #34

wants to merge 4 commits into from

Conversation

ppeczek
Copy link

@ppeczek ppeczek commented Nov 21, 2017

Missing enpoint in pbclient API is getting a new task, selected by pybossa. Very similar to get tasks list

@ppeczek
Copy link
Author

ppeczek commented Nov 21, 2017

Forgot to write test. Update will come soon

@teleyinex
Copy link
Member

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.

@ppeczek
Copy link
Author

ppeczek commented Nov 22, 2017

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?

@teleyinex
Copy link
Member

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.

@ppeczek
Copy link
Author

ppeczek commented Nov 27, 2017

Please, don't rush with merging it. I made some enhancements. BTW the coveralls isn't in rush anyway 🤣

@teleyinex
Copy link
Member

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.

@@ -454,6 +454,34 @@ def get_tasks(project_id, limit=100, offset=0, last_id=None):
raise


def get_new_task(project_id, limit=1, offset=0, last_id=None):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need your opinion on this one: is it desired use case to send multiple new tasks at once?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RaduCStefanescu
Copy link

Heya!
Any chance we might get a status on this PR? We are depending on it for our own project interfacing with PyBossa.
If any changes are still required, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants