Skip to content
This repository was archived by the owner on Jan 26, 2023. It is now read-only.

WIP first draft of Python Gitcoin API client #2

Closed

Conversation

raphaelhuefner
Copy link
Contributor

@mbeacom Please do not merge this PR, but only use it to give me feedback.

Additionally, I have these questions:

  • Is it OK to test by mocking the requests library so that it does not send any actual HTTP requests? Or do we have to fire up a complete local instance of Gitcoin to run it against?
  • I could not really figure out which filter parameters are available for the https://gitcoin.co/api/v0.1/universe API endpoint. I only got as far as http://django-filter.readthedocs.io/en/latest/guide/rest_framework.html#using-the-filter-fields-shortcut and that the corresponding filter_fields setting is missing from ExternalBountyViewSet.
  • Could you please clarify who will set up Travis, Pypi and codecov.io ?

Thank you!
Raphael

@raphaelhuefner
Copy link
Contributor Author

Ah, looks like Travis is already set up.

import requests


class Config:
"""Define Base Class for API Endpoint Config."""
params = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@raphaelhuefner raphaelhuefner changed the title first draft of Python Gitcoin API client WIP first draft of Python Gitcoin API client May 25, 2018
@raphaelhuefner
Copy link
Contributor Author

I shouldn't have included tests which run against the live API, I guess... I'll find a way to make them optional, so that Travis won't run them.

At least now we know that my API wrapper will bubble up those 4xx and 5xx HTTP errors. ;-)

@mbeacom
Copy link
Contributor

mbeacom commented May 28, 2018

@raphaelhuefner You should be able to use something like mock or responses to handle mocking the results from the api.

@raphaelhuefner
Copy link
Contributor Author

This PR is now obsolete, it is superseded by #3

@raphaelhuefner raphaelhuefner deleted the rfc--do-not-merge branch August 18, 2018 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants