Going barebones with Hull.data.api
tl;dr; Click on the headings, paragraphs and list elements of this page and rate them as you please.
What will we do ?
We will build a minimalistic review tool for documentation, taking this very
as a source.
The purpose of the tool is to allow readers to indicate within a document which are the parts
they like the most.
More precisely, with hull.io's API, we will on the fly create entities within our platform (those entities being the paragraphs and headings of the document) so the readers, once logged in with Twitter, can review these entities.
I want to play with it
The demo is located on github pages.
Head on to the demo page and click on any paragraph or heading, a popover will show either:
- a Login button if you're not logged in yet
- a (un)Recommend button with the associated number of recommendations for the selected entity
Source code, please!
The magic is contained in the file located at
complete annotated source code is available here;
Fork and Install
To install your own, you must have a hull.io account, and have created an application.
Then copy your application's id and organization's URL (found in the admin) in the file
Then run the following commands:
npm install grunt prepare grunt server
grunt server will start a server listening on port
9000 which you can use for development purpose.
Use in your own project
Everything that is needed to enable these functionnalities for your app (apart from
hull.js) is contained in a single
which you can find in the file
This file also bootstraps the demo, to give an overview of the expected parameters.
Want moar ?
If you want to get in touch with us, feel free to email us at email@example.com.