New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rentry-pastebin

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rentry-pastebin

Client for RENTRY-Pastebin API

latest
Source
npmnpm
Version
1.3.0
Version published
Weekly downloads
53
-1.85%
Maintainers
1
Weekly downloads
 
Created
Source

Rentry Pastebin

Client for https://rentry.co/ API

Installation

$ npm install rentry-pastebin

Examples

$ git clone git://github.com/klarulor/rentry-pastebin/ --depth 1
$ cd example
$ npm install
import {RentryClient, Paste} from "rentry-pastebin";

const client = new RentryClient();
(async () => {
    await client.createToken();
    console.log(`New token is: ${client.getToken()}`);
    const paste = await client.createPaste({content: "Idk some words maybe", customEditCode: "imsostupid"})
    console.log(`Paste url is: "https://rentry.co/${paste.url}" and secret edit key is "${paste.editCode}" and content is "${paste.paste.getContent()}"`);
    //paste.paste.pull(); // Pull or update content from rentry.co
    setTimeout(() => {
        paste.paste.setContent("new content; New message xD");
        console.log(`Updated content. Check the website`);
    }, 5000);

})()

Documentation

Import:

import {RentryClient, Paste} from "rentry-pastebin";

Create client with auth-token:

const client = new RentryClient();
await client.createToken();
console.log(`New token is: ${client.getToken()}`);

Create new paste:

const struct = await client.createPaste({content: "Idk some words maybe", customEditCode: "imsostupid"})
console.log(`Paste url is: "https://rentry.co/${struct.url}" and secret edit key is "${struct.editCode}" and content is "${struct.paste.getContent()}"`);

Update content

struct.paste.setContent("new content; New message xD");

Keywords

pastebin

FAQs

Package last updated on 03 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts