isgd-api
v1.1.1
Published
- Shorten - Lookup
Downloads
53
Maintainers
Readme
ISGD Link Shortener API
Features
- Shorten
- Lookup
Synchronous Examples
Shorten
isgdApi.shorten('https://www.youtube.com/')
.then(console.log)
.catch(err => console.log("Link not valid"))
Lookup
isgdApi.lookup('https://is.gd/G8mOLb')
.then(console.log)
.catch(err => console.log("Link not valid"))
Asynchronous Examples
Shorten
const shortenYTLink = async () => {
const link = await isgdApi.shorten('https://www.youtube.com/')
console.log(link)
}
shortenYTLink()
Lookup
const lookupYTLink = async () => {
const link = await isgdApi.lookup('https://is.gd/G8mOLb')
console.log(link)
}
lookupYTLink()