ursh

1.0.1 • Public • Published

URL Shortener API (Ursh)

Setup!

npm i ursh

Import the package!

const ursh = require("ursh");

Shorten A URL!

(async () => {
  let url = "https://foo.bar";
  let custom = "foobar";
  let response = await ursh.add(url, custom);
  console.log(response);
  /*{
      error: false,
      key: 'foobar',
      long: 'https://foo.bar',
      short: 'https://ursh.deta.dev/foobar',
      timestamp: 1663049744100
   }*/
})();

Get Details Of Shorten URL!

(async () => {
  let code = "foobar";
  let response = await ursh.get(code);
  console.log(response);
  /*{
      error: false,
      key: 'foobar',
      long: 'https://foo.bar',
      short: 'https://ursh.deta.dev/foobar',
      timestamp: 1663049744100
   }*/
})();

/ursh/

    Package Sidebar

    Install

    npm i ursh

    Weekly Downloads

    3

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    1.97 kB

    Total Files

    3

    Last publish

    Collaborators

    • dedomil