# rentry-pastebin

> Client for RENTRY-Pastebin API

Latest version **1.3.0** (published 2022-12-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install rentry-pastebin
pnpm add rentry-pastebin
yarn add rentry-pastebin
bun add rentry-pastebin
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2022-12-03 |
| First published | 2022-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 24.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | klarulor |
| Maintainers | klarulor |
| Keywords | pastebin, rentry, rentry-pastebin, client-api |

## Links

- npm: https://www.npmjs.com/package/rentry-pastebin
- Repository: https://github.com/Klarulor/rentry-pastebin
- Homepage: https://github.com/Klarulor/rentry-pastebin#readme
- Issues: https://github.com/Klarulor/rentry-pastebin/issues
- npm.io page: https://npm.io/package/rentry-pastebin

## Dependencies (4)

- [request](https://npm.io/package/request.md) ^2.88.2
- [typescript](https://npm.io/package/typescript.md) ^4.7.4
- [@types/request](https://npm.io/package/@types/request.md) ^2.48.8
- [rentry-pastebin](https://npm.io/package/rentry-pastebin.md) ^1.0.2

## Recent versions

- 1.3.0 (latest) — 2022-12-03
- 1.2.2 (stable) — 2022-06-25
- 1.2.3 — 2022-06-25
- 1.2.1 — 2022-06-25
- 1.2.0 — 2022-06-25
- 1.1.11 — 2022-06-25
- 1.1.10 — 2022-06-25
- 1.1.9 — 2022-06-25
- 1.1.8 — 2022-06-25
- 1.1.7 — 2022-06-25
- 1.1.6 — 2022-06-25
- 1.1.5 — 2022-06-25
- 1.1.4 — 2022-06-25
- 1.1.3 — 2022-06-25
- 1.1.2 — 2022-06-25
- … 5 more at https://npm.io/package/rentry-pastebin/versions

## README

# 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
```

```typescript
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:
```typescript
import {RentryClient, Paste} from "rentry-pastebin";
```
Create client with auth-token:
```typescript
const client = new RentryClient();
await client.createToken();
console.log(`New token is: ${client.getToken()}`);
```
Create new paste:
```typescript
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
```typescript
struct.paste.setContent("new content; New message xD");
```

---
_Source: https://npm.io/package/rentry-pastebin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
