1.0.5 • Published 1 year ago

urlcutjs v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Install

npm install urlcutjs

Usage

const UrlcutClient = require("urlcutjs");
const Client = new UrlcutClient("API-Key");
// TypeScript/ES Module support
import UrlcutClient from "urlcutjs";
const Client = new UrlcutClient("API-Key");

How to shortend a link

Client.Create("https://www.example.com")
  .then((data) => console.log(data))
  .catch((err) => console.error(err));

Output

{
  "success": true,
  "shortened": "CxTYCb",
  "domain": "example.com",
  "credits": 0.4
}

How to delete an existing short link

Client.Delete("Example-Short")
  .then((data) => console.log(data))
  .catch((error) => console.error(error));

Output

{
  "success": true
}

How to get the analytics of a short link

Client.Analytics("Example-Short")
  .then((data) => console.log(data))
  .catch((error) => console.error(error));

Output

{
  "success": true,
  "countriesOfTheUsers": [ { "DE": 1 } ],
  "usersDeviceType": { "PC": 1, "PHONE": 0 }
}

Contributors

Contributors

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago