-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
First crack at resources
.
#311
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
Conversation
@chriddyp @cldougl @etpinard @BRONSOLO thoughts? I think a super-thin wrapper around our underlying api might be pretty nice! It would nicely solve the following within the same framework: "From the api..."
This would be totally orthogonal to the idea of The other option is to somehow build all of this into I'd love any thoughts on this one. There are a few issues in this repo that I think this would solve cleanly. |
Also, this is a general |
👍 |
I think @doeg had some thoughts on this too (from the node perspective) |
Cool! Yeah, (re?)writing the Plotly API as an npm module is ticketed here: https://github.com/plotly/streambed/issues/3013 We haven't been thinking about it yet, but I'm definitely interested in this discussion. The thinner and more closely coupled the wrapper is to our actual API the better, in my opinion. If anyone has any examples of some especially well implemented APIs, I'd love to see 'em. (I know Twitter's entire API is an antipattern of what not to do...) |
part of me feels like we should just document how to do this well with requests. Read through their quick-start, as he explores the github api: http://docs.python-requests.org/en/v1.0.1/user/quickstart/ maybe the best approach is to document how to do these common tasks (with the nice thing about keeping it tightly coupled to the API is that we'll only need to update the api.plot.ly docs |
@doeg yeah the npm module spec you've got going is right inline with what I want for the Python API. @chriddyp totally see your point about not maintaining another hunk of code. just thought I'd bring this up though. as our api gets more consistent, implementing a thin wrapper around it gets easier. that said, it's still something to maintain. |
Something I've been thinking about for a little while now.
We basically allow users to interact with
Figure
andGrid
objects, but these are really just part of generalFile
objects.This is sorta what I've got in mind right now (and this is weakly implemented already in this PR):
This isn't really ready to be merged in, but I wanted to open up the discussion with some actual code.