1.1.2 • Published 1 year ago

lunar-api v1.1.2

Weekly downloads
-
License
AGPL-3.0
Repository
github
Last release
1 year ago

⚡ 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