@jeremyx9/pastebin

1.0.3 • Public • Published

Pastebin.js

How to start

First of all you have to download the package with npm install @jeremyx9/pastebin.js
Then you have to get a developer key at https://pastebin.com/doc_api#1

include the pastebin.js module

const Pastebin = require("@jeremyx9/pastebin");

create a paste variable to configure options and create a paste

var paste = new Pastebin("your_dev_key");

configure options

the following options are the options set by default

paste.options = {
    paste_private: "1",
    paste_expire_date: "10M",
    paste_name: "PastebinAPI Snippet",
    paste_format: "text",
    user_key: "",
};

create a paste and get the associated url

async function createPaste() {
    const url = await paste.newPaste("$world = new World();");
    console.log(url); // https://pastebin.com/4CaivHJm
}

Thats it!

Package Sidebar

Install

npm i @jeremyx9/pastebin

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

3.05 kB

Total Files

3

Last publish

Collaborators

  • jeremyx9