0.4.18 • Published 1 year ago

@cordxapp/pastes v0.4.18

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

CordX Pastes

Simple module for posting and fetching code snippets, text and more to/from our bin.


Documentation


Install

npm install @cordxapp/pastes

Imports

Commonjs

const { PasteClient } = require('@cordxapp/pastes');

ES6

import { PasteClient } from '@cordxapp/pastes';

New paste

import {PasteClient} from '@cordxapp/pastes'
const pastes = new PasteClient();

await pastes.post('Some text sting or whatever you want here!')
.then((r) => {

    console.log(r);
}).catch((e) => {

    console.log(e.stack)
});

Get paste

import {PasteClient} from '@cordxapp/pastes'
const pastes = new PasteClient();

await pastes.get('PASTE_KEY/ID_HERE')
.then((r) => {

    console.log(r.data);
}).catch((e) => {

    console.log(e.stack)
});

Get raw

import {PasteClient} from '@cordxapp/pastes'
const pastes = new PasteClient();

await pastes.raw('PASTE_KEY/ID_HERE')
.then((r) => {

    console.log(r.code);
}).catch((e) => {

    console.log(e.stack)
});
0.4.18

1 year ago

0.4.16

1 year ago

0.4.14

1 year ago

0.2.0

2 years ago

0.1.1

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago