-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add task and challenge endpoints #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, nice job getting these out. I learned a lot about the MapRoulette API today 😄
maproulette/api/challenge.py
Outdated
"""Method to retrieve challenge information via the corresponding challenge name and parent (project) ID | ||
|
||
:param project_id: the ID of the parent project | ||
:param challenge_name: the ID corresponding to the challenge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The challenge name is a string right?
@@ -42,6 +72,48 @@ def get_challenge_statistics_by_id(self, challenge_id): | |||
response = self.get(endpoint=f"/data/challenge/{challenge_id}") | |||
return response | |||
|
|||
def get_challenge_listing(self, project_ids="", limit=10, page=0, only_enabled='true'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! I didn't know this existed.....
) | ||
return response | ||
|
||
def get_tasks_by_tags(self, tags, limit=10, page=0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+100 ! @dcastrowa
Description:
This PR adds a bunch of new /task and /challenge endpoints. It also reorganizes the examples into a smaller number of files. There will not be an example for every endpoint, just those that seem worth showing examples for.
Potential Impact:
Adds to the overall list of supported endpoints.
Unit Test Approach:
Tox
Test Results:
Tox tests passed.