pastebin-ts
pastebin-ts ===
Last updated 7 months ago by j3lte .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pastebin-ts 
SYNC missed versions from official npm registry.

pastebin-ts

NPM Build Status DAVID npm version Development Dependency Status Code Climate

Typescript version of the Pastebin API client

Features

  • getPaste : get a raw paste
  • createAPIuserKey : get a userkey for the authenticated user
  • listUserPastes : get a list of the pastes from the authenticated user
  • getUserInfo : get a list of info from the authenticated user
  • listTrendingPastes : get a list of the trending pastes on Pastebin
  • createPaste : create a paste
  • createPasteFromFile : read a file (UTF8) and paste it
  • deletePaste : delete a paste created by the user

Example

const PastebinAPI = require('pastebin-ts');

const pastebin = new PastebinAPI({
    'api_dev_key' : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'api_user_name' : 'PastebinUserName',
    'api_user_password' : 'PastebinPassword'
});

pastebin
    .createPasteFromFile({
        'file': './uploadthistopastebin.txt',
        'title': 'pastebin-js test'
    })
    .then((data) => {
        // we have succesfully pasted it. Data contains the id
        console.log(data);
    })
    .catch((err) => {
        console.log(err);
    });

Current Tags

  • 1.2.0                                ...           latest (7 months ago)

2 Versions

  • 1.2.0                                ...           7 months ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (15)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |