npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sinlyxe-api

v1.2.0

Published

Official Node.js SDK for the Sinlyxe API

Readme

Sinlyxe SDK

Official Node.js SDK for the Sinlyxe API.

Features

  • Zero dependencies - Uses native fetch (Node.js 18+)
  • Full TypeScript-like JSDoc support
  • Comprehensive error handling
  • Rate limit information
  • Webhook signature verification

Installation

npm install sinlyxe-api

Requirements

  • Node.js 18.0.0 or higher (uses native fetch)

Quick Start

import Sinlyxe from 'sinlyxe-api';

const client = new Sinlyxe('sinlyxe_your_api_key');

// Get account info
const account = await client.account.get();
console.log(`Daily commends remaining: ${account.limits.commend.daily_remaining}`);

API Reference

Initialization

import Sinlyxe from 'sinlyxe-api';

// Basic usage
const client = new Sinlyxe('sinlyxe_your_api_key');

// With options
const client = new Sinlyxe('sinlyxe_your_api_key', {
  timeout: 60000  // Request timeout in ms (default: 30000)
});

Account

// Get account information and limits
const account = await client.account.get();
console.log(account.username);
console.log(account.limits.commend.daily_remaining);

// Get API usage statistics
const usage = await client.account.usage();
console.log(usage.total_requests);
console.log(usage.last_24h_requests);

Commend Bot

// Create commend session with per-type control (recommended)
// Cost is calculated as max(friendly, teacher, leader)
const session = await client.commend.create({
  steamId: '76561198123456789', // Steam ID, profile URL, or vanity URL
  friendly: 50,                 // Number of friendly commends
  teacher: 30,                  // Number of teacher commends
  leader: 20                    // Number of leader commends
});
console.log(session.session_id);
// Cost: 50 (the highest of the three)

// Legacy format (sends all 3 types with same count)
const session = await client.commend.create({
  steamId: '76561198123456789',
  amount: 10  // Sends 10 friendly, 10 teacher, 10 leader
});

// Get session status (includes per-type progress)
const status = await client.commend.get(session.session_id);
console.log(status.status);              // 'QUEUED', 'running', 'done', 'canceled'
console.log(status.successful);          // Total successful
console.log(status.friendly_completed);  // Friendly commends completed
console.log(status.teacher_completed);   // Teacher commends completed
console.log(status.leader_completed);    // Leader commends completed

// List sessions
const sessions = await client.commend.list({
  status: 'done',  // Optional filter
  limit: 50        // Max 100
});

// Cancel session
await client.commend.cancel(sessionId);

Report Bot

// Create report session
const session = await client.report.create({
  steamId: '76561198123456789'
});

// Get session status
const status = await client.report.get(session.session_id);

// List sessions
const sessions = await client.report.list({ limit: 20 });

Comment Bot

// Create comment session
const session = await client.comment.create({
  steamId: '76561198123456789',
  amount: 5  // 1-50 comments
});

// Get session status
const status = await client.comment.get(session.session_id);

// List sessions
const sessions = await client.comment.list({ limit: 20 });

// Cancel session
await client.comment.cancel(sessionId);

Hourboost - Accounts

// List all accounts
const accounts = await client.hourboost.accounts.list();

// Add new account
const account = await client.hourboost.accounts.add({
  username: 'steam_user',
  password: 'steam_pass',
  sharedSecret: 'optional_2fa_secret'  // Optional
});

// Get account details
const details = await client.hourboost.accounts.get('steam_user');

// Update account settings
await client.hourboost.accounts.update('steam_user', {
  onlineStatus: true,
  autoAcceptFriends: true,
  receiveCommends: false,
  cardFarming: false,
  customGame: 'Custom Game Name',
  gameListId: 123
});

// Start/Stop hourboost
await client.hourboost.accounts.start('steam_user');
await client.hourboost.accounts.stop('steam_user');

// Submit Steam Guard code (when required)
await client.hourboost.accounts.submitGuard('steam_user', '12345');

// Set game list
await client.hourboost.accounts.setGameList('steam_user', 123);

// Remove account
await client.hourboost.accounts.remove('steam_user');

Hourboost - Game Lists

// List all game lists
const lists = await client.hourboost.gamelists.list();

// Create game list
const list = await client.hourboost.gamelists.create({
  name: 'My Games',
  games: [730, 570, 440]  // CS2, Dota 2, TF2
});

// Get game list
const details = await client.hourboost.gamelists.get(listId);

// Update game list
await client.hourboost.gamelists.update(listId, {
  name: 'Updated Name',
  games: [730, 570, 440, 252490]  // Added Rust
});

// Delete game list
await client.hourboost.gamelists.delete(listId);

Error Handling

import Sinlyxe, {
  SinlyxeError,
  AuthError,
  RateLimitError,
  ValidationError,
  ForbiddenError,
  NotFoundError,
  ConflictError,
  ServiceUnavailableError
} from 'sinlyxe-api';

try {
  await client.commend.create({ steamId: '...', friendly: 10, teacher: 10, leader: 10 });
} catch (error) {
  if (error instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${error.retryAfter} seconds`);
  } else if (error instanceof AuthError) {
    console.log('Invalid API key or IP not bound');
  } else if (error instanceof ForbiddenError) {
    console.log('Access denied:', error.message);
  } else if (error instanceof ValidationError) {
    console.log('Invalid input:', error.message);
  } else if (error instanceof NotFoundError) {
    console.log('Not found:', error.message);
  } else if (error instanceof ConflictError) {
    console.log('Conflict:', error.message);
  } else if (error instanceof ServiceUnavailableError) {
    console.log('Service unavailable:', error.message);
  } else if (error instanceof SinlyxeError) {
    console.log(`API Error (${error.status}): ${error.message}`);
  }
}

Rate Limits

The API has a rate limit of 200 requests per minute per API key. Rate limit information is available after each request:

await client.account.get();

console.log(client.rateLimit);
// {
//   limit: 30,
//   remaining: 29,
//   reset: 1706384400  // Unix timestamp
// }

Webhook Verification

When receiving webhooks, verify the signature to ensure authenticity:

import Sinlyxe from 'sinlyxe-api';

// In your webhook handler (e.g., Express)
app.post('/webhook', (req, res) => {
  const signature = req.headers['x-sinlyxe-signature'];
  const isValid = Sinlyxe.verifyWebhook(req.body, signature, 'your_webhook_secret');

  if (!isValid) {
    return res.status(401).send('Invalid signature');
  }

  // Process webhook
  const event = req.body;
  console.log('Received event:', event.type);

  res.status(200).send('OK');
});

License

MIT