Skip to content

JeremyX9/hastebin.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published