mootari / observable-client

MIT License
14 stars 6 forks source link

Provide a cell-level API #5

Open mootari opened 4 years ago

mootari commented 4 years ago

TBD

GordonSmith commented 4 years ago

For my purposes I would like to see:

RandomFractals commented 4 years ago

would be nice to also have a convenience method for updating single cell. something along the lines of:

updateCell(notebookUrl, cellId, value, pinned)

mootari commented 4 years ago

Please keep in mind that a document's node content is a list of changesets. To update a single cell, you'd:

  1. determine the cell id by its name
  2. create a changeset for that cell id and submit it

Updating a single cell by name seems a bit too high level and specific for a first iteration. However, ideally you should be able to implement these kinds of abstractions on top of the API.

RandomFractals commented 4 years ago

yeah, I agree. Maybe phase 2. I just thought it would make it really easy to have that as part of this api for notebook editors to just submit cell code changes and pinned state, which I suspect would be your most frequently used scenario for this api.