
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
The Tiny1z API Client is a convenient and lightweight npm package that allows developers to seamlessly integrate the Tiny1z URL Shortener API into their applications. Simplify URL shortening, retrieval, and management with just a few lines of code.
A modern, lightweight, and type-safe npm package for integrating the Tiny1z URL Shortener API into your JavaScript or TypeScript applications. Easily create short URLs, handle bulk shortening, and manage your links with a simple, class-based API.
npm install tiny1z
# or
yarn add tiny1z
import Tiny1zClient from 'tiny1z';
// Replace 'your-api-key' with your actual API key
const apiKey = 'your-api-key';
// Instantiate the client
const client = new Tiny1zClient(apiKey);
// Create a single URL
const singleUrlData = {
original_url: "https://www.example.com", // Required
alias: "alias-example", // Optional
password: "123456", // Optional
expiry_duration: 5, // Optional
expiry_unit: "hours", // Optional: 'hours', 'days', or 'months'
user_reference: "adam" // Optional: Any tag or label
};
const singleUrlResponse = await client.createSingleUrl(singleUrlData);
// Create multiple URLs in bulk
const bulkData = {
original_urls: [
{
url: "https://www.example.com",
alias: "alias-example",
password: "123456",
expiry_duration: 5,
expiry_unit: "hours",
},
{
url: "https://www.example.com"
}
],
global_password: null,
global_expiry_duration: null,
global_expiry_unit: null,
user_reference: "ali"
};
const bulkUrlResponse = await client.createBulkUrl(bulkData);
// Get user URLs by user reference
const userReference = 'user_reference';
const userUrls = await client.getUserUrls(userReference);
// Get information about a single URL by slug
const slug = 'alias-example';
const singleUrlInfoResponse = await client.singleUrlInfo(slug);
// Get all user URLs with pagination and sorting
const offset = 0;
const limit = 10;
const sort = 'desc'; // or 'asc'
const allUserUrls = await client.getAllUrls(offset, limit, sort);
See the Tiny1z API Documentation for endpoint details, parameters, and response formats.
Authorization
header.Pull requests and issues are welcome! See the GitHub repository.
FAQs
The Tiny1z API Client is a convenient and lightweight npm package that allows developers to seamlessly integrate the Tiny1z URL Shortener API into their applications. Simplify URL shortening, retrieval, and management with just a few lines of code.
The npm package tiny1z receives a total of 23 weekly downloads. As such, tiny1z popularity was classified as not popular.
We found that tiny1z demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.