1.0.1 • Published 9 months ago
trlinkrache v1.0.1
Installation
npm install trlinkrache
Usage
const LinkShortener = require('./linkShortener');
const apiKey = 'API_KEY';
const destination = 'https://yourdestinationlink.com';
const count = "2"
/*
5 -> Film/Dizi
4 -> Spor/Futbol
3 -> Oyun/İndirme
2 -> Diğer
1 -> Yetişkin içerik +18
*/
const linkShortener = new LinkShortener(apiKey);
linkShortener.on('linked', shortenedUrl => {
console.log('Shortened URL:', shortenedUrl);
});
linkShortener.shortenLink(destination, count)
.then(() => console.log('Link shortening completed.'))
.catch(error => console.error('Error:', error.message));