hypothesis-api-client
[![NPM version][npm-image]][npm-url]


[![Try hypothesis-api-client on RunKit][runkit-image]][runkit-url]
[![Coverage percentage][coveralls-image]][coveralls-url]
> A Hypothes.is API client for browser and server-side
Installation
``
sh
$ npm install --save hypothesis-api-client
`
Usage
`
js
const HypothesisClient = require('hypothesis-api-client');
let hypothesisClient = new HypothesisClient(TOKEN);
hypothesisClient.searchAnnotations({url: 'https://hypothes.is'}, (err, annotations) => {
console.log(annotations)
})
``
Methods
The client currently supports the following methods. JSDoc can be found
here.
$3
*
createNewAnnotation(annotation, callback)
* createNewAnnotations(annotationsArray, callback)
*
fetchAnnotation(id, callback)
*
updateAnnotation(id, annotation, callback)
*
deleteAnnotation(id, callback)
* deleteAnnotations(annotationsArray, callback)
*
searchAnnotations(data, callback): Search up to 10K bulk annotations in parallel (faster). Maybe it will be deprecated.
* searchBunchAnnotations(data, offset, callback): Search a bunch (up to 200) of annotations giving an offset (up to 9.8K)
*
searchAnnotationsSequential: Search over 10K bulk annotations sequentially (slower).
$3
*
getListOfGroups(data, callback)
*
removeAMemberFromAGroup(groupId, user, callback)
*
createHypothesisGroup(data, callback)
$3
*
getUserProfile(callback)
License
MIT ©
Haritz Medina
[npm-image]: https://badge.fury.io/js/hypothesis-api-client.svg
[npm-url]: https://npmjs.org/package/hypothesis-api-client
[coveralls-image]: https://coveralls.io/repos/haritzmedina/hypothesis-api-client/badge.svg
[coveralls-url]: https://coveralls.io/r/haritzmedina/hypothesis-api-client
[runkit-image]:https://badge.runkitcdn.com/hypothesis-api-client.svg
[runkit-url]: https://npm.runkit.com/hypothesis-api-client