A Pastecord API wrapper for uploading documents.
$ npm i pastecord
Construct a new client and use client.publish
to create a new document.
const Pastecord = require("pastecord");
const Client = new Pastecord();
(async () => {
const Data = await Client.publish("Hello, World!");
// Client.publish() returns an object containing 'url' and 'key'
console.log(Data.url);
})();
Client.publish(body: any)
Publishes a new document to Pastecord.
Returns an object containing the url of the document and the identifier (key) of the document.
Object {
url: "https://pastecord.com/ikunisirym",
key: "ikunisirym",
}
@ Justin K.
MIT License