Clever Javascript Library
Installation
Via npm:
npm install clever
Usage
Clever = ;var clever = ;
If you'd like to play around with our test data, please use the token: DEMO_TOKEN
.
See our developer guide for more information.
The clever
package exposes objects corresponding to resources:
- District
- School
- Section
- Student
- Teacher
- Event
Each exposes a query API that closely resembles that of Mongoose. The available methods are find
, findOne
, and findById
:
cleverDistrict; cleverSchool; cleverSchool;
When no callback is passed, the methods return a query object that allows you to build up a query over time:
cleverSchool;
Query objects also support a stream interface for auto-pagination:
// pull sections 10 at a timevar count = 0;var stream = cleverSection;stream;stream;
Feedback
Questions, feature requests, or feedback of any kind is always welcome! We're available at tech-support@clever.com.