1.0.1 • Published 4 years ago
vultrex.haste v1.0.1
VultrexHaste
A simple Hastebin wrapper for novices in node-fetch – developed with ♥ by Host#0001. Documentation by Host#0001.
Installation
npm i vultrex.haste
npm i node-fetch
Example usage
const { VultrexHaste } = require("vultrex.haste");
const haste = new VultrexHaste({
url: "https://hasteb.in"
});
// POST to Hastebin
haste.post("Lorem ipsum dolor sit amet")
.then(url => console.log(url)) // Return the URL...
.catch(err => console.log(err)); // Return an error...
// GET from Hastebin
haste.get("https://hastebin.com/raw/dhguygwyujw")
.then(content => console.log(content)) // Return the content of the hastebin...
.catch(err => console.log(err)); // Return an error...