Add an API function to the Gitcoin Python SDK.
Easier Gitcoin API consumption, both internally, and by third parties.
pip install gitcoin
from gitcoin import Gitcoin
api = Gitcoin()
api.bounties.all()
api.filter(pk__gt=100).all()
GET /api/v2/bounties
Please create a PR against the following repo https://github.com/gitcoinco/python-api-client
@mbeacom look ok?
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__This issue now has a funding of 0.12 ETH (82.55 USD @ $687.95/ETH) attached to it.__
Made a few minor adjustments to the proposed usage. lgtm!
Hi there, I'm researching a bit on this and looking over the repo for the first time -- is the api currently
/api/v0.1/bounties? Thanks!
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__Work has been started__.
These users each claimed they can complete the work by 8 months, 3 weeks ago.
Please review their action plans below:
1) raphaelhuefner has started work.
Hello Kevin,
Questions:
api.filter(pk__gt=100).all() should rather read api.bounties.filter(pk__gt=100).all() ?Action plan:
filter()orderby param as orderby()limit and offset params as page_size() and get_page(pagenum=1)urllib.request.urlopen() in all() and get_page()Cheers!
Raphael
Learn more on the Gitcoin Issue Details page.
@raphaelhuefner
Questions:
bounties is it. Ultimately, we'll probably want to expand this to include universe as well.api.bounties works best, so we can ultimately work in universe and other api operations. Please see my proposed base example at:
https://github.com/gitcoinco/python-api-client/pull/1/files#diff-04c6e90faac2675aa89e2176d2eec7d8R16
Action Plan:
Can we:
order_by vs orderby to maintain parity with django ?get_page() to take page number and limit?requests versus urllibFeel free to ping me on slack if you have any questions!
@mbeacom Thank you for your feedback!
I'll take your PR into account.
I have all of these 3 going:
order_by() with an _get_page(number, per_page)requests library@mbeacom @gitcoinbot Please use this PR to give some feedback for further direction: https://github.com/gitcoinco/python-api-client/pull/2
Thank you!
Raphael
@raphaelhuefner Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Hello @mbeacom , @owocki (and @gitcoinbot ;-) ,
Please review https://github.com/gitcoinco/python-api-client/pull/3 .
I will submit this now on the bounty page but would be happy about any kind of feedback!
Phew, my first bounty ever is shaping up to become an actual thing, wow! This was quite the revealing learning experience!
Thank you!
Raphael
Alas, this is also my first (payable) interaction with Ethereum, so I had to apply for the Gitcoin faucet in order to go through with submitting this work on the bounty page. (Just in case you wondered why nothing is submitted there, yet.)
Phew, my first bounty ever is shaping up to become an actual thing, wow! This was quite the revealing learning experience!
hehe... welcome to the other side!
Alas, this is also my first (payable) interaction with Ethereum, so I had to apply for the Gitcoin faucet in order to go through with submitting this work on the bounty page. (Just in case you wondered why nothing is submitted there, yet.)
thanks! im on calls all day today so can't review the PR today but i did just approve your faucet request
@raphaelhuefner Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@raphaelhuefner @owocki @mbeacom Snoozed Gitcoin Bot here as this one is on our side to review 👍
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__Work for 0.12 ETH (62.14 USD @ $517.84/ETH) has been submitted by__:
@owocki please take a look at the submitted work:
@mbeacom Thank you for merging my PR https://github.com/gitcoinco/python-api-client/pull/3 !
@owocki Does that merge mean that my work could get accepted on the Gitcoin issue page ?
I wasn't even sure myself anymore, but I actually managed to submit my work before the expiry of the bounty:
fulfillment_submitted_on: 2018-06-11T18:12:52.960243Z
expires_date: 2018-06-17T23:04:02Z
(
Which I looked up with Gitcoin's shiny new Python API client 😄 like so:
from gitcoin import Gitcoin
api = Gitcoin()
bounties = api.bounties.filter(standard_bounties_id=467).filter(pk__gt=3563).all() # .get(pk) goes 500 at the moment of this writing
print('fulfillment_submitted_on: {}'.format(bounties[0]['fulfillment_submitted_on']))
print('expires_date: {}'.format(bounties[0]['expires_date']))
)
Good thing that Gitcoin has a Python API client now 😉 !
yes i'm accepting it today.. weee!
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__The funding of 0.12 ETH (34.66 USD @ $288.86/ETH) attached to this issue has been approved & issued to @raphaelhuefner.__
Cool, thank you!
Most helpful comment
Hello @mbeacom , @owocki (and @gitcoinbot ;-) ,
Please review https://github.com/gitcoinco/python-api-client/pull/3 .
I will submit this now on the bounty page but would be happy about any kind of feedback!
Phew, my first bounty ever is shaping up to become an actual thing, wow! This was quite the revealing learning experience!
Thank you!
Raphael