[annotator-dev] Store endpoint to use when using annotatorit as the backend store

Apurva Jalit apurva.jalit at gmail.com
Sat Mar 21 05:57:59 UTC 2015


Hey,
I've gone through the documentation available on the site but some how not
able to figure out what end to be given in the store plugin when I want to
use annotateit as the backend. Following are some relevant code snippets I
am using:

        var content = $('p');
//content.annotator();
var url= document.URL;
content.annotator('addPlugin', 'Auth', {
tokenUrl: 'http://127.0.0.1:5000/genToken',
token: //Using a default token
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0dGwiOjg2NDAwLCJpc3N1ZWRBdCI6IjIwMTUtMDMtMjBUMDY6NDc6MzVaIiwiY29uc3VtZXJLZXkiOiI2MzE0ZjhmZjk0OTY0MGQ0ODAwYjdhNDFlMWZlNjg5NSIsInVzZXJJZCI6IjIifQ.7TUW4rW1XkFrDrGaffOEGu6nVjm-sp5QqapDWKZ9COg'
});
 content.annotator('addPlugin', 'Store', {
// The endpoint of the store on your server.
prefix: 'http://annotateit.org/user/abc', //What to use here?

//Attach the uri of the current page to all annotations to allow search.
annotationData: {
'uri': url
},

// This will perform a "search" action when the plugin loads. Will
// request the last 20 annotations for the current url.
// eg. /store/endpoint/search?limit=20&uri=http://this/document/only
loadFromSearch: {
'limit': 20,
'uri': url
}
});
});

Thanks,
Apurva Jalit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150321/1ee208cd/attachment-0002.html>


More information about the annotator-dev mailing list