
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Install
npm i tirij-api
Example
Free use
Links created in free use 7-day type and qr cannot be created.
import { LinkService } from "tirij-api"
const service = new LinkService()
await service.createFree(longUrl);
Basic Auth use
Feild | Type | Description |
---|---|---|
username | string | Api public key |
password | string | Api secret key |
slug | string | Store slug |
expireType | string ("never" or "date", or "count") | Expire type |
expireAt | string ( "Date(1650611871048)" or "Date(2022-04-22T07:08:34.090Z)" or "2022-04-22T07:08:34.090Z") | Expire date |
clickCount | { max: number, count: number } | Click Count |
You can shorten any type of link you want through a store belonging to your account.
import { LinkService } from "tirij-api"
const service = new LinkService({}, { username, password })
await service.create(slug, {
longUrl: longUrl,
expireType: expireType,
expireAt: expireAt,
clickCount:{
max: max,
count: count
},
});
Create Qr
Feild | Type | Description |
---|---|---|
username | string | Api public key |
password | string | Api secret key |
slug | string | Store slug |
_id | string | Link id |
type | string ("short" or "long") | Link type |
options | ILinkQrOptions | qr-code-styling-node-options |
While creating qr, qr-code-styling-node package was used. You can forward all qr-code-styling-node settings from options.
import { LinkService } from "tirij-api"
const service = new LinkService({}, { username, password })
const result = await service.createQr(slug, _id, "short" || "long", { type: "svg"});
require("fs").writeFile(`${result.data._id}.svg`, result.data.base64, 'base64', function(err) {
console.log(err);
});
FAQs
Install
We found that tirij-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.