Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@short.io/client-node
Advanced tools
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.
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.
See the API docs for more information.
To install this package, type:
npm i @short.io/client-node
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";
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);
Create links:
const link = await shortio.link.create({
domain: "link.example.com",
path: "example",
originalURL: "https://example.com",
});
console.log(link.shortURL); // https://link.example.com/example
const publicLink = await shortio.link.createPublic({
domain: "link.example.com",
originalURL: "https://example.com",
publicAPIKey: "PUBLIC_API_KEY",
});
console.log(publicLink.shortURL); // https://link.example.com/a83t48
const secureLink = await shortio.link.createSecure({
domain: "link.example.com",
publicAPIKey: "PUBLIC_API_KEY",
originalURL: "https://example.com",
});
console.log(secureLink.shortURL); // https://link.example.com/a83t48#ta95me8
FAQs
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
We found that @short.io/client-node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.