1.0.3 • Published 3 years ago

peekalink v1.0.3

Weekly downloads
159
License
MIT
Repository
github
Last release
3 years ago

Peekalink Node.js API Client

This module is an API client for the Peekalink service to be used in Node.js. This module does NOT work in the browser.

Usage

Installation:

npm i peekalink

... or:

yarn add peekalink

Usage with CommonJS:

const { Client } = require('peekalink');
const client = new Client({ apiKey: 'your-api-key' });

Usage with ES imports:

import { Client } from 'peekalink';
const client = new Client({ apiKey: 'your-api-key' });

Methods

Get link preview data:

const preview = await client.preview('https://okuna.io');

Check if a link is available:

const availability = await client.isAvailable('https://ankida.agency');

Contribution

The Peekalink Node.js API client library is an open-source project and any contribution is welcome! When contributing, we kindly ask you to make sure your changes pass linting:

npm run lint

Unit tests must always pass before submitting a PR. If you've made major changes on the code, we also expect you to update/write unit tests and make sure they pass. The unit tests should never interact with the real API - we have mocks for that.

npm run test

To get test coverage reports, run the following command:

npm run test:cover

License

The module is licensed under the MIT license.

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago