node-sincerely 0.0.1
Node.js library to access Sincerely's Ship API.
Quick start
npm install sincerely
Example Usage
var sincerely = 'your-app-key' path = fs = Landscape6x4 = path Portrait4x6 = path; // you could use the `async` module here to parallel// load a `frontPhotoId` and a `profilePhotoId` // read the file as a base64 stringfs;
API
All methods take a data
object as their first parameter and a callback(err, response)
as their last parameter.
sincerely.create
- Create a new order for the purposes of mailing a physical print and returns success or error.sincerely.upload
- Uploads an image asset and returns an id that can be used when callingsincerely.create
.sincerely.debug
- Outputs a print preview PDF showing you waht the final print will look like. Please note that this should be used for debug purposes only and should not be output to the end user.sincerely.cancel
- Cancel a print placed via the api before it ships. Prints are usually sent to production 2-4 hours from initial creation.
Documentation for these methods can be found at Sincerely's RESTful web api ("Ship API").
Tests
To run tests, install vows
:
npm install vows
Then run:
SINCERELY=your-app-key vows test/*
Contributors
- Nick Baugh niftylettuce@gmail.com
License
MIT Licensed