2.2.0 • Published 6 months ago

@short.io/client-node v2.2.0

Weekly downloads
-
License
FSL
Repository
github
Last release
6 months ago

Short.io Node.js SDK

The Short.io Node.js official SDK client is a library that allows you to integrate short.io URL shortening and link management API with your Node.js application in an easy and elegant way. This SDK contains methods for working with links and domains.

API reference

See the API docs for more information.

Installing

To install the SDK, run:

npm i @short.io/client-node

Getting Started

First you need to get your API key from the Short.io dashboard in the Integrations & API section. Then you need to set the configuration for the client:

import { setApiKey } from "@short.io/client-node";

setApiKey("YOUR_API_KEY");

Usage

Import the needed methods from the SDK and use them in your code:

import {
    getApiDomains,
    getLinksExpand,
    // and other needed methods
} from "@short.io/client-node";

const domainsResp = await getApiDomains();

domainsResp.data will contain the list of domains.

const linkResp = await getLinksExpand({
    client,
    query: {
        domain: "your_domain.com",
        path: "lnk_abc123_abcde12345,
    },
});

linkResp.data will contain the expanded link.

2.2.0

6 months ago

2.1.1

6 months ago

2.0.1

6 months ago

2.0.0

6 months ago

1.1.0

11 months ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago