npm.io
1.0.1 • Published 5 years ago

protectedtext-api

Licence
MIT
Version
1.0.1
Deps
2
Size
6 kB
Vulns
23
Weekly
0
Stars
8

Welcome to protectedtext-api

Version

Documentation Maintenance License: MIT Twitter: pabloskubert

Unofficial protectedtext.com API

Install

npm install protectedtext-api

Usage

const ProtectedTextAPI = require('protectedtext-api');

(async function() {
    const site_id = "test";
    const site_password = "123";

    var TabManager = (await new ProtectedTextAPI(site_id, site_password).loadTabs());
    var savedText  = (await TabManager.view());

    // View saved content
    console.log(savedText);

    // Save new content, but keep old text
    await TabManager.save(savedText.concat("IT WORKS!"));
})();

API REFERENCE

Method Params Description Returns
save text: string Save the given text, rewriting tab content boolean
view void Get all tab' s content string
deleteSite void delete site, with all content, dangerous method. boolean

Future implementations

  • Add tab support
  • Add support for browser
  • Auto register site, if not exists

Author

Pablo Skubert pablo1920@protonmail.com

Show your support

Give a ️ if this project helped you!

License

Copyright 2021 Pablo Skubert pablo1920@protonmail.com.
This project is MIT licensed.

Keywords