@adobe/spacecat-shared-ahrefs-client
v1.5.12
Published
Shared modules of the Spacecat Services - Ahrefs Client
Downloads
1,017
Maintainers
Keywords
Readme
Spacecat Shared - Ahrefs Client
A JavaScript client for the Ahrefs API v3, part of the SpaceCat Shared library. It allows you to query the Ahrefs API for top pages, backlinks, organic traffic data, and more.
Installation
Install the package using npm:
npm install @adobe/spacecat-shared-ahrefs-client
Usage
Constructor
import AhrefsAPIClient, { fetch } from '@adobe/spacecat-shared-ahrefs-client';
const config = {
apiKey: '<API_KEY>',
apiBaseUrl: '<API_BASE_URL>',
};
const client = new AhrefsAPIClient(config, fetch);
Creating and instance from Helix UniversalContext
const context = {}; // Your AWS Lambda context object
const client = AhrefsAPIClient.createFrom(context);
Testing
To run tests:
npm run test
Linting
Lint your code:
npm run lint
Cleaning
To remove node_modules
and package-lock.json
:
npm run clean
Additional Information
- Repository: GitHub
- Issue Tracking: GitHub Issues
- License: Apache-2.0