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 🙏

© 2025 – Pkg Stats / Ryan Hefner

boosty-ai-api

v0.0.33

Published

Node.js AI generated client for Boosty API

Downloads

4

Readme

boosty-api

Node.js client for Boosty API. This library provides a simple way to interact with the Boosty platform programmatically.

Installation

npm install boosty-api

If you plan to use the interactive login feature, you'll also need to install Playwright:

npm install playwright
npx playwright install chromium

Usage

Authentication

There are two ways to authenticate with the Boosty API:

1. Interactive Login (Browser-based)

This method opens a browser window for you to log in to Boosty:

const { API, interactiveLogin, Auth } = require('boosty-api');

async function main() {
  // Interactive login (opens a browser window)
  const authResolver = await interactiveLogin();
  
  // Create API client with authentication
  const api = new API({ auth: new Auth(authResolver) });
  
  // Now you can make authenticated requests
  const post = await api.getPost('blogName', 'postId');
  console.log(post.title);
}

main().catch(console.error);

2. Using Saved Authentication Data

If you already have authentication data (from a previous login), you can use it directly:

const { API, Auth, FileAuthDataResolver } = require('boosty-api');
const path = require('path');

async function main() {
  // Load authentication data from a file
  const authResolver = new FileAuthDataResolver(path.join(__dirname, 'auth.json'));
  
  // Create API client with authentication
  const api = new API({ auth: new Auth(authResolver) });
  
  // Now you can make authenticated requests
  const post = await api.getPost('blogName', 'postId');
  console.log(post.title);
}

main().catch(console.error);

Public Content

For public content, you don't need authentication:

const { API } = require('boosty-api');

async function main() {
  // Create API client without authentication
  const api = new API();
  
  // Get a public post
  const post = await api.getPost('boosty', 'c9fb8a19-c45e-4602-9942-087c3af28c1b');
  
  // Print post title and URL
  console.log(post.title);
  console.log(post.url);
}

main().catch(console.error);

API Reference

API Class

The main class for interacting with the Boosty API.

Constructor

new API(options)
  • options.httpClient (optional): Custom HTTP client
  • options.auth (optional): Authentication manager

Methods

Posts
  • createPost(blogName, newPost): Create a new post
  • getPosts(blogName, options): Get posts from a blog
  • getPost(blogName, postId, options): Get a specific post
  • updatePost(blogName, postId, editedPost): Update a post
  • deletePost(blogName, postId): Delete a post
Comments
  • getPostComments(blogName, postId, options): Get comments for a post
Deferred Access
  • getPostDeferredAccess(blogName, postId): Get deferred access for a post
  • updatePostDeferredAccess(blogName, postId, editedDeferredAccess): Update deferred access for a post
Blacklist
  • getBlacklistedUsers(blogName): Get blacklisted users for a blog
File Downloads
  • downloadFile(url, params): Download a file as a stream

Auth Class

Manages authentication with the Boosty API.

Constructor

new Auth(resolver)
  • resolver: Authentication data resolver

Authentication Resolvers

FileAuthDataResolver

Loads authentication data from a file.

new FileAuthDataResolver(filePath)
  • filePath: Path to the authentication data file

interactiveLogin

Opens a browser window for interactive login.

await interactiveLogin(options)
  • options.headless (optional): Run browser in headless mode (default: true)
  • options.timeout (optional): Login timeout in milliseconds (default: 60000)

License

MIT