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

apparatus-sdk

v1.0.2

Published

JavaScript SDK for Apparatus.ai

Readme

ApparatusAI JavaScript SDK

The ApparatusAI SDK provides an easy-to-use interface to interact with the ApparatusAI API. This SDK enables developers to fetch user information, run business forecasts, and analyze social trends using ApparatusAI's powerful machine learning models.

Features

  • 🔐 Secure API Token Authentication
  • 📊 Business Forecasting
  • 📈 Social Trend Analysis
  • Easy Integration with JavaScript & Node.js

Installation

To install the SDK, run:

npm install apparatus-sdk

Getting Started

1. Import the SDK

const ApparatusAI = require("apparatus-sdk");

2. Initialize the SDK with your API Token

const ai = new ApparatusAI("apai_your_api_token_here");

⚠️ Note: Ensure your API token starts with apai_, or an error will be thrown.

3. Fetch User Info

(async () => {
    try {
        const userInfo = await ai.getUserInfo();
        console.log("User Info:", userInfo);
    } catch (error) {
        console.error("Error fetching user info:", error.message);
    }
})();

4. Perform Business Forecasting

(async () => {
    try {
        const forecastData = await ai.forecast({ revenue: [10000, 12000, 15000] });
        console.log("Forecast Result:", forecastData);
    } catch (error) {
        console.error("Forecasting Error:", error.message);
    }
})();

5. Analyze Social Trends

(async () => {
    try {
        const socialTrends = await ai.analyzeSocialTrends({ keyword: "AI Trends" });
        console.log("Social Trends Analysis:", socialTrends);
    } catch (error) {
        console.error("Social Analysis Error:", error.message);
    }
})();

API Reference

new ApparatusAI(apiToken)

Creates an instance of the SDK.

.getUserInfo()Promise<Object>

Fetches the authenticated user's information.

.forecast(data: Object)Promise<Object>

Submits business data for forecasting.

Parameters:

  • data (Object): An object containing business metrics like revenue, expenses, etc.

Example:

await ai.forecast({ revenue: [10000, 12000, 15000] });

.analyzeSocialTrends(params: Object)Promise<Object>

Analyzes social trends based on the given parameters.

Parameters:

  • params (Object): Contains keyword, dateRange, and other optional filters.

Example:

await ai.analyzeSocialTrends({ keyword: "Artificial Intelligence" });

Error Handling

If the API request fails, the SDK throws an error with details:

try {
    await ai.getUserInfo();
} catch (error) {
    console.error("API Error:", error.message);
}

Contributing

  1. Fork the repository
  2. Create a new branch (git checkout -b feature-branch)
  3. Commit your changes (git commit -m "Add new feature")
  4. Push to the branch (git push origin feature-branch)
  5. Open a pull request

License

This SDK is licensed under the MIT License.


🚀 Start building with ApparatusAI today!