ympc-yo
A Yo client library to send Yos. It provides a hybrid promise / node-style API.
Examples
var API_KEY = 'this-is-my-api-key-asdf-ghjklmnopqrs';var Yo = ;var yo = API_KEY; // promiseyo ; // node-styleyo;
API
yo = new Yo(apiKey)
Create a new instance.
Arguments
apiKey
(string; required): Your Yo APU key. Can be objained at the Yo dashboard.
var API_KEY = 'this-is-my-api-key-asdf-ghjklmnopqrs';var Yo = ;var yo = API_KEY;
promise = yo.yo(username)
Send a regular Yo.
Returns
- Promise with response body
Arguments
username
(string; required): A Yo username
yo ;
promise = yo.yoLink(username, link)
Send a Yo with a link.
Returns
- Promise with response body
Arguments
username
(string; required): A Yo usernamelink
(string; required): A URL
yo ;
promise = yo.yoAll(link)
Send a Yo with a link to all subscribers.
Returns
- Promise with response body
Arguments
link
(string; required): A URL
yo ;
promise = yo.getSubscriberCount()
Get the number users who have subscribed to your Yo account.
Returns
- Promise with number of subscribers
yo ;
Handling Errors
According to the Yo docs
{ return { return errstatusCode === code; }} yo ;
License
MIT