@jeremyx9/hastebin

0.0.1 • Public • Published

Pastebin.js

How to start

First of all you have to download the package with npm install @jeremyx9/hastebin.js

include the hastebin.js module

const Hastebin = require("@jeremyx9/hastebin");

create a paste variable to configure options and create a paste

const paste = new Hastebin();

create a paste and get the associated key for the paste

async function createPaste() {
    const url = await paste.newPaste("$world = new World();");
    console.log(url); // egasiwulog -> you can set the url before (https://www.toptal.com/developers/hastebin/egasiwulog)
}

get paste with key

async function getPaste() {
    const data = await paste.getPaste("egasiwulog");
    console.log(data); // $world = new World();
}

Thats it!

Package Sidebar

Install

npm i @jeremyx9/hastebin

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

2.49 kB

Total Files

3

Last publish

Collaborators

  • jeremyx9