Interface with the [Abbrefy](https://abbrefy.xyz/) API and bring all the power of Abbrefy right into your Node.js applications.
npm install abbrefyjs
const Abbrefy = require('abbrefy');
const abbrefy = new Abbrefy({
apiKey: 'your api key',
});
// Allow for authless and authenticated abbrefying (shortening) of urls.
abbrefy
.abbrefy('https://google.com')
.then((url) => {
console.log(url);
console.log(url.url);
})
.catch((error) => console.log(error));
// provides pathway for modifying information relating to an Abbrefy url.
abbrefy
.modify({
oldSlug: 'goohh',
slug: 'gooh',
title: 'Google Server',
stealth: false,
})
.then((url) => {
console.log(url);
})
.catch((error) => console.log(error));
// delete Abbrefy urls you don't need anymore.
abbrefy
.mortify('gooh')
.then((res) => {
console.log(res);
})
.catch((error) => console.log(error));
// retrieve an array of all of your Abbrefy links.
abbrefy
.classify()
.then((res) => {
console.log(res);
})
.catch((error) => console.log(error));
// retrieves information about an Abbrefy url.
abbrefy
.identify('abbrefy_api')
.then((res) => {
console.log(res);
})
.catch((error) => console.log(error));
``