This package has been deprecated

Author message:

Please use 'pastedeno' as your new Pastebin client

pastebin-ts
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

pastebin-ts

NPM Libraries.io dependency status for GitHub repo master npm version npm Code Climate codecov

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 successfully pasted it. Data contains the id
        console.log(data);
    })
    .catch((err) => {
        console.log(err);
    });

Readme

Keywords

Package Sidebar

Install

npm i pastebin-ts

Weekly Downloads

83

Version

1.3.0

License

MIT

Unpacked Size

65.4 kB

Total Files

25

Last publish

Collaborators

  • j3lte
  • jeltemx