Jump to content
Sign in to follow this  
deliciousbees

JSON field requests: id for donations/donors, donation ranges

Recommended Posts

Hi there, LeaveIt2Beaver!

 

Short version:

We'd love some way to get a unique id for a donation (and/or donors). Also, depending on how limiting works since it's ambiguous right now, we'd love a way to either get all donations OR get donations in a range.

 

Long version: 

Thanks for opening up the JSON feed last year - we used it during our stream for managing donations and our live counter and it was super useful! We did run into a few problems though that we'd love to get some solutions for before the big day this year:

 

  - Unique IDs for donations. Right now the closest we have is hashing some combination of donation amount, username, and time donated. Unfortunately, all of these are unstable for us - you can have multiple people donating the same amount in the same second (like the $4.20 rush on the Giant Bomb main stream), and the display name can change at any time and retroactively change the name of previous donations, making it unusable for hashing.

 

It'd be great if we could bypass all of that and just have a donation ID that we could use instead. If that's tough, getting the donor ID would help us close that hole to a degree too - while we'd still have the money/time issue, we could include a stable donor ID into the mix to get something unique since the same person isn't going to donate twice in a second.

 

"Can't you use the order that these donations come in?", I hear you say? Well, that leads to the next request!

 

 - A way to get all donations, OR a way to get a range of donations, depending on intended behaviour. Our initial testing last year showed that on some big pages, the JSON request would only show the most recent donations (~170 iirc?) - hence why we had to generate our own ID per donation. When we were live, we did manage to get a full list of multiple hundreds though - so I'm not sure if the behaviour changed between testing and live, the limit was raised, or if we weren't flagged as a "big" fundraiser. So depending on functionality...

 

  • If the behavior is that JSON returns all donations all the time - we'd love a way to get donations in a range too, so that we aren't pulling in big sets of data every minute when we don't need to. It'd be great if this includes the row count as well.
  • If the behavior is that JSON returns the most recent x donations - we'd love a way to get the full list of donations, for situations where we need to wipe our local cache.

 

Thanks again!

-Dan

 

  • Like 2

Share this post


Link to post
Share on other sites

Just want to second this. More robust info means more creative ways encourage donations.

Share this post


Link to post
Share on other sites

@deliciousbees @Sgoast @vectorsigmasix - This thread's a bit old, but not forgotten!  We've got some updates to the JSON coming tomorrow 10/31 that I hope will be helpful to you ahead of Game Day.

 

Please take a look at the documentation here:  https://www.extra-life.org/ddpublicapi

 

One big addition is an endpoint you can hit to get a list of donations for all team members, vs. needing to sweep through donations for each participant. For that endpoint as well as the others that return an array (participant donations, team roster) here's what's new:

 

  • We'll provide an x-total-records response header so you know how many records are there for a given endpoint.
  • We're introducing pagination - you'll get the most recent 100 records first, and you can append &page=X to get older records.
  • For every record, you'll see a new "timestamp" value that's intended to be useful as a (functionally) unique ID - unlike the "createdOn" this has millisecond fidelity.

 

Thanks for your input and for all you do for Extra Life!  Let us know how you go with these updates, and hope you can join the conversation over here.

 

  • Like 1

Share this post


Link to post
Share on other sites

Hey Matt, thanks for the update! We'll implement changes today and yell if we run into issues.

 

Two quick question:

 * Does fetching multiple pages count towards the 60s request rate/DDoS flagging? Or is that only for re-requesting/refreshing the same page?

 * Are you guys worried about the new "100 record" default breaking other applications that use the API before it was paginated? Don't get me wrong, I'm glad we have this functionality and that we have the bandwidth to roll with integrating that change here, but shifting that to the default a few days before game day also seems pretty scary in general.

 

Edit: Just saw the other thread, I'll repost in there.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...