Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@short.io/client-node

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@short.io/client-node

The Short.io Node.js official SDK client is a library that allows you to integrate [short.io](https://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 lin

  • 2.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
144
decreased by-62.4%
Maintainers
0
Weekly downloads
 
Created
Source

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 { client } from "@short.io/client-node";

client.setConfig({
    baseUrl: "https://api.short.io",
    headers: {
        Authorization: "YOUR_API_KEY",
    },
});

Usage

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

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

Pass created client to the methods:

const domainsResp = await getApiDomains({ client });

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.

Keywords

FAQs

Package last updated on 04 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc