Skip to content

A library providing a simple to use interface for generating lennies via https://lenny.today

License

Notifications You must be signed in to change notification settings

LennyToday/lenny-node-sdk

Repository files navigation

RESTful Lenny NodeJS SDK Build Status

Provides a promise interface to RESTful-lenny bringing ( ͡° ͜ʖ ͡°) to your NodeJS projects!

Getting Started

Run npm install lenny-node-sdk in the root folder of your project.

Usage

To use:

  • require the module const lenny = require('lenny-node-sdk');
  • call either lenny.lenny() to request a lenny or lenny.random()
  • A promise will be returned containing the lenny requested, or throwing a rejection

It's that simple!

Both calls optionally take in specific body parts, as well as a count:

  • lenny.lenny(null, 10) generates ten lennies
  • lenny.lenny({ ears: '<' }) generates < ͡° ͜ʖ ͡°<

The full list of body parts are available can be found on the RESTful lenny github page

Prerequisites

NodeJS (version >= 6.x) npm (version >= 4.x)

Running the tests

Tests require NodeJS version >= 8.x.

To run tests:

npm test

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hats off to the lenny.today team for providing the RESTful lenny api

About

A library providing a simple to use interface for generating lennies via https://lenny.today

Resources

License

Stars

Watchers

Forks

Packages

No packages published