Openwhyd API Client
A simple Node.js API client for Openwhyd.org.
Your can use it to:
- initiate a cookie-based Openwhyd user session, given their email address and password;
- make authenticated calls to Openwhyd's API endpoints;
- end the user session.
- Install the npm dependency to your Node.js project:
$ npm install openwhyd-api-client
- Use it to make API calls:
const OpenwhydAPI = ;const creds =email: "firstname.lastname@example.org" // email address or user handle of your openwhyd accountmd5: "6af652b33ce6a86ecf025b0da8ca8d24" // md5 hash of your openwhyd password;const openwhydAPI = ;openwhydAPI;
The class exported from the package provides the following methods:
login (email, md5, callback)
get (path, params, callback)
callback functions are called with
(err, res) as parameters.
Each instance of the class holds the cookie that identifies the user session initiated with that instance.