# dontpad-api

> An unofficial API to read and write content to www.dontpad.com

Latest version **1.0.5** (published 2019-11-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install dontpad-api
pnpm add dontpad-api
yarn add dontpad-api
bun add dontpad-api
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-11-14 |
| First published | 2018-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 32.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Abner Ferreira Santos |
| Maintainers | abnerfs |
| Keywords | dontpad.com, api |

## Links

- npm: https://www.npmjs.com/package/dontpad-api
- Repository: https://github.com/abnerfs/dontpad-api
- Homepage: https://github.com/abnerfs/dontpad-api#readme
- Issues: https://github.com/abnerfs/dontpad-api/issues
- npm.io page: https://npm.io/package/dontpad-api

## Dependencies (2)

- [jsdom](https://npm.io/package/jsdom.md) ^15.2.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.0.0

## Recent versions

- 1.0.5 (latest) — 2019-11-14
- 1.0.3 — 2018-06-29
- 1.0.2 — 2018-02-16
- 1.0.1 — 2018-02-16
- 1.0.0 — 2018-02-16

## README

# dontpad-api
An unofficial API to read and write content to www.dontpad.com

# Requirements
- NodeJS

# Installation
```npm install --save dontpad-api```


# Usage

- Import the api to your file
```javascript 
const dontpad = require('dontpad-api');
```

# Functions

**writeContent(dontPad, text)**: Write the specified text to the specified dontpad url.

**readContent(dontPad)**: Retrieves the content of the specified dontpad url.

# Sample 

Writing and Reading content to a dontpad url

```javascript
const dontpad = require('dontpad-api');

const dontPadTarget = 'testdontpad';

dontpad.writeContent(dontPadTarget, 'This is a test ')
    .then(response => {
        console.log('Saved succesfully...');
        
        dontpad.readContent(dontPadTarget)
            .then(conteudo => {
                console.log("Reading dontpad content... ");
                console.log('Content: ', conteudo);
                console.log('Check the content in http://dontpad.com/' + dontPadTarget);
            }).catch(err => {
                console.log('Error reading dontpad ', err)  
            });
    })
    .catch(err => {
        console.log('Error saving dontpad ', err);
    })



```

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