For Developers

Installation

Install the @edlink/typescript package using npm or yarn.

npm install edlink
yarn add edlink

Initialize

Create a new instance of the SDK and pass it the following configuration. You can find your client_id and client_secret in the Edlink Dashboard by following the instructions here.

import { Edlink } from '@edlink/typescript';

const edlink = new Edlink({
    version: 2,
    client_id: '3a95a779-0ed1-499b-a352-9ea30d0bd5ea',
    client_secret: '4SqfIcgi4AtE2fbfOabNSqRqHmWJsqf5VqQkBYU7DKKIyymnJTc6KSGvHDCBLaXt'
});

Edlink.up().then(console.log); // Ok

Using the SDK in Vanilla JS

The Edlink TypeScript SDK can be also imported into Vanilla JS. Here's an example of how to import the SDK into a Vanilla JS project:

const { Edlink } = require('@edlink/typescript');

const edlink = new Edlink({
    version: 2,
    client_id: '3a95a779-0ed1-499b-a352-9ea30d0bd5ea',
    client_secret: '4SqfIcgi4AtE2fbfOabNSqRqHmWJsqf5VqQkBYU7DKKIyymnJTc6KSGvHDCBLaXt'
});

Next Steps