-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Expose Grant information via API #6633
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6633 +/- ##
==========================================
- Coverage 27.22% 26.70% -0.52%
==========================================
Files 288 294 +6
Lines 26865 28094 +1229
Branches 3965 4131 +166
==========================================
+ Hits 7313 7503 +190
- Misses 19280 20325 +1045
+ Partials 272 266 -6
Continue to review full report at Codecov.
|
There're still some information missing in the API IMO 🤔 |
@LefterisJP + @owocki soft review needed ! @Jack-Works If you could list out what's missing / even better -> raise a PR against |
@Jack-Works Have you checked out the endpoint at https://gitcoin.co/api/v0.1/grants/. It lists all the data related to all the grants and you could query a specific grant with it's Please do check that endpoint to see if it helps and feel free to specifically mention any other data that you think you need and the structure of the response as done in the original comment for this issue #6493 Also feel free to join the discussion at the issue page #6493 |
Oh @sebastiantf yes it cover most of our cases (#6493 (comment) ) |
left a comment #6650 (comment) |
@octavioamu How do you mean to extend grants.json? |
… On Wed, May 13, 2020 at 8:45 AM Sebastian T F ***@***.***> wrote:
@octavioamu <https://github.com/octavioamu> How do you mean to extend
grants.json?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6633 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD5PCMPIIQ7AIY7QAMTRILRRKXANANCNFSM4M6X4O5A>
.
_________________________________________
gitcoin is live and has generated over $4.6mm for Open Source Software - see
our results <https://gitcoin.co/results>
|
I am aware of that endpoint. But it only contains the admin address for each grant, right? Wouldn't a better REST API endpoint be better? |
@Jack-Works This hasn't been merged yet. So it's not live yet. |
Any idea or roadmap of merging this? We’re trying to integrate this into Maskbook to maximize the UX and make more people to donate easily |
hey @gitcoinco/engineers i've got a request from an external collaborator to get this in to be live before round 6. to get ahead of that could we get it in review? given that its greenfield functionality, im hopeful that its not too much chance of regression.
From Suji on telegram.. ^^ |
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.
Really nice and clean!
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.
defer to engineering on this one!
Thanks for the merge! |
try now, the API is live |
Thanks |
I tried to query the result for LikeCoin and can't construct a usable URL. Returns nothing Error 502 |
@sebastiantf did you performance test your PR? looks like the second issue is timing out. |
@owocki @Jack-Works It seems the current output from the /grants/report/ endpoint contains duplicate entries, which is supposedly causing a performance issue at the endpoint, ultimately leading to a 502 https://gitcoin.co/api/v0.1/grants/report/?eth_address=0x89d1FeC16BA1c8aEbC7866263eb4Ca2D8bD8EeC4 The above request returns fine without a 502, but duplicate entries can be found. I have a PR up at #6830 that should fix this. |
👍👍
…On Thu, Jun 11, 2020 at 16:02 Sebastian T F ***@***.***> wrote:
@owocki <https://github.com/owocki> @Jack-Works
<https://github.com/Jack-Works> It seems the current output from the
/grants/report/ endpoint contains duplicate entries, which is supposedly
causing a performance issue at the endpoint, ultimately leading to a 502
https://gitcoin.co/api/v0.1/grants/report/?eth_address=0x89d1FeC16BA1c8aEbC7866263eb4Ca2D8bD8EeC4
The above request returns fine without a 502, but duplicate entries can be
found.
I have a PR up at #6830 <#6830> that
should fix this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6633 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTAVTP6UFPJSMJ52J5WASDRWCFRZANCNFSM4M6X4O5A>
.
|
It's still returning 502. Can you take a look why? |
It didn't return fine without a 502, which #6830 won't help at all. |
Got it. Thanks! |
Description
Adds a new endpoint:
/api/v0.1/grants/report
URL Query parameters:
eth_address
: Ethereum addressfrom_timestamp
: Timestamp to filter contributions received by Grantee. Example:2019-01-15T01:24:15Z
to_timestamp
: Similar tofrom_timestamp
Example:
Request:
GET /api/v0.1/grants/report/?eth_address=0xCC4b3DE30576E161C8632786560Fa7DD3Fb33f77&from_timestamp=2020-05-01T01:24:15Z&to_timestamp=2020-05-30T01:24:15Z
Response:
Refers/Fixes
Fixes #6493
Testing