Socket
Socket
Sign inDemoInstall

@short.io/client-node

Package Overview
Dependencies
0
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
133
decreased by-2.21%
Maintainers
2
Install size
127 kB
Created
Weekly downloads
 

Readme

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.

API reference

See the API docs for more information.

Installing

To install this package, type:

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. This SDK contains methods for working with links, domains and statistics. Import the Shortio class:

import { Shortio } from "shortio";

Usage

Then create an instance of the Shortio class, and pass your API key as the first parameter:

const shortio = new Shortio("YOUR_API_KEY");

To get the domain list, you can use the following code:

const domains = await shortio.domain.list();

Get the link list of the first domain above:

const links = await shortio.link.list(domains[0].id);

Get the link statistics of the first link above:

const stats = await shortio.statistics.getByLink(links[0].idString);

Keywords

FAQs

Last updated on 13 Jul 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc