lunar-api
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Lunar API

JS Library for the Lunar API


Lunar API lets you interact with our image libraries and image generation


Currently this library does not support our image generation endpoints, but will be available in a later update.

require('dotenv').config();
const LunarAPI = require('lunar-api');
const lunar = new LunarAPI(process.env.LUNARAPI); // Your API Key goes here

(async () => {
	const res = await lunar.sfw.hug();
	// const resid = await lunar.sfw.hug(true); 
    // Passing true returns the raw JSON response with the ID and URL
    
	console.log(res);
    /* If passing true to return the JSON response, simply do the following to get each key/value:
    console.log(res.id) or console.log(res.url)
    */
})();

Lunar API Docs:

https://docs.lunardev.group

Package Sidebar

Install

npm i lunar-api

Weekly Downloads

0

Version

1.1.2

License

AGPL-3.0

Unpacked Size

22.7 kB

Total Files

15

Last publish

Collaborators

  • lunarsdev