0.0.4 • Published 1 year ago
efficientlinks v0.0.4
Efficient Links
Efficient Links is a cost-effective link analysis tools. This is a convenience wrapper for the Efficient Links GraphQL API.
First, import the library:
const client = require('efficientlinks');
Then, authenticate using your API key:
client.setKey(API_KEY);
Then, perform the actions you wish.
Get a link preview
To get a preview of a link, use:
const linkPreview = await client.getLinkPreview(url);
console.log('linkPreview', linkPreview);
Assess a link for spam
To get an assessment of the spamminess of a link, use:
const spamScore = await client.getLinkSpam(url,
{userMessage,
userId,
userEmailDomain,
userRegistrationDate,
title,
description});
console.log('Spam Score', spamScore);