Closed hadley closed 10 years ago
Awesome. It will be great to get these things down on paper (or markdown).
Or get them down for a paper. Lots of best practices things are published. Might be too niche. But you never know. On Mar 17, 2014 8:48 PM, "Scott Chamberlain" notifications@github.com wrote:
Awesome. It will be great to get these things down on paper (or markdown).
Reply to this email directly or view it on GitHubhttps://github.com/ropensci/hackathon/issues/23#issuecomment-37894718 .
For now I think getting them down would be great. A paper is somewhat secondary (how many API developers will read it, especially if it ends up pay walled). If we're hoping to improve data access in the science space, we should just aim to get this out as wide as possible.
To this end, can you recommend a simple API package that's still reasonably complicated (handles auth etc) - that would help me brainstorm.
well RMendeley could use a complete rewrite; since they've moved to OAuth2.0 and which makes the current package with it's clunky RCurl implementation irrelevant ;-) http://dev.mendeley.com/
On Tue, Mar 18, 2014 at 2:02 PM, Hadley Wickham notifications@github.comwrote:
To this end, can you recommend a simple API package that's still reasonably complicated (handles auth etc) - that would help me brainstorm.
Reply to this email directly or view it on GitHubhttps://github.com/ropensci/hackathon/issues/23#issuecomment-37987734 .
Carl Boettiger UC Santa Cruz http://carlboettiger.info/
That has a lot of functions. Anything a little smaller?
well RMendeley could use a complete rewrite; since they've moved to OAuth2.0 and which makes the current package with it's clunky RCurl implementation irrelevant ;-) http://dev.mendeley.com/
@cboettig That repo is such a sore point for me because 180 commits and two months of work in and ROAuth
was never released to CRAN. Now the API has changed. bleh. We should get that repo upgraded to httr
at some point although it doesn't feel like a priority for the hackathon.
@hadley How about the Google Drive API for an example?
@karthik I think that's even more complicated than mendeley! I want something with like 10 api calls.
I need to implement an R client for the OpenCPU API as well. It's probably not a good use case, but would love to get some thoughts on best practices for API clients before I start with this.
@hadley What about rnoaa
https://github.com/ropensci/rnoaa - It's an interface to NOAA climate data. Has auth - just api keys.
@emhart @karthik @cboettig you may have a better example though
@sckott rnoaa
looks good!
FWIW, I just spent a painful day and a half implementing the new Mendeley OAuth2 authentication in a Ruby application: https://github.com/articlemetrics/alm/blob/develop/app/models/sources/mendeley.rb (look for get_access_token
). The fun part is that their application tokens (i.e. not tied to user accounts) expire every 60 minutes.
It's pretty common for access tokens to expire frequently - google does this too. httr will automatically refresh for you.
I'd love to watch/talk about/participate in this; sounds fun.
Hi @Ironholds Would you like to hack with us remotely? If so please drop me an email so I can invite you to our chat room. Makes for easier discussion and participation.
Sure; I'm Dario's coworker, so as I understand it I might actually be attending ;). Is the API discussion likely to be on the agenda?
Indeed. Dario mentioned you might join us. Are you in SF this week?
Indeedy!
ok, please email me so we can discuss this outside of this issue (email in my profile)
This sounds potentially part of issue #19 (in that there is an obvious sustainability challenge in the way one chooses to write API packages). I've described both under the "Sustainable Software" in the hackathon wiki's Projects page, but feel free to seperate them if folks would rather tackle these parts seperately.
In progress: https://github.com/hadley/httr/blob/master/vignettes/api-packages.Rmd. It's very rough but I'll keep working on it. Please submit pull requests :smile:
awesome, thanks @hadley
:sparkles: wow.
There's a lot of stuff in my head that isn't written down anywhere.