I need your help, guys.
For a Blockstack app that I am currently developing (textlibrary.co), I would love to integrate a JavaScript library that provides a set of tools for annotating content in webpages.
I get the front-end implementation running… in the browser console I can log a JSON of the annotation data … it works in a “non persistent way” just fine.
The library comes with a module that could send REST API calls to a storage.
Being more on the designing side of things … unfortunately I couldn’t figure out how I might make this work.
For the rest of the React app I use for reading and writing data from/to Gaia like demonstrated in the tutorials via “getFile(fileName, options)” etc. … but in the case of the library it might make sense if I could use the API module that is provided by this library.
The module in the library gives these options to configure the set up of the storage.
var app = new annotator.App()
.include(annotator.storage.http, {
prefix: 'https://gaia.blockstack.org/hub/',
create: '/annotations',
update: '/annotations/{id}',
destroy: '/annotations/{id}',
search: '/search'
});
Here is a link to the documentation:
http://docs.annotatorjs.org/en/latest/api/storage.html#
Any idea how I could set this up, so that the Gaia storage of the user (signed in with Blockstack) would communicate with this library module?
Sorry upfront if this is not doable based on that information… or a bigger effort … I thought I might just miss an obvious thing…
Apologies again, if that’s not an easy thing to do at all …
Thanks so much for your help!