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

@extrachill/api-client

v0.2.2

Published

Universal typed API client for the Extra Chill platform. Works in WordPress blocks, React Native, and Node.

Readme

@extrachill/api-client

Universal typed API client for the Extra Chill platform. One package, every context — WordPress blocks, React Native, Node.

Install

npm install @extrachill/api-client

Quick Start

React Native / Node / Browser

import { ExtraChillClient, FetchTransport } from '@extrachill/api-client';

const client = new ExtraChillClient(
  new FetchTransport({
    baseUrl: 'https://extrachill.com/wp-json',
    getAuthHeaders: () => ({ Authorization: `Bearer ${token}` }),
    onUnauthorized: () => handleLogout(),
  })
);

const artist = await client.artists.getArtist(42);
const feed = await client.activity.getFeed();
const events = await client.events.calendar({ venue: 'continental-club' });

WordPress Blocks

import { ExtraChillClient } from '@extrachill/api-client';
import { WpApiFetchTransport } from '@extrachill/api-client/wordpress';
import apiFetch from '@wordpress/api-fetch';

const client = new ExtraChillClient(new WpApiFetchTransport(apiFetch));

const leaderboard = await client.users.leaderboard();
await client.blog.generateBandName();

Node with Basic Auth

import { ExtraChillClient, FetchTransport } from '@extrachill/api-client';

const client = new ExtraChillClient(
  new FetchTransport({
    baseUrl: 'https://extrachill.com/wp-json',
    getAuthHeaders: () => ({
      Authorization: `Basic ${btoa('user:application-password')}`,
    }),
  })
);

await client.admin.syncTaxonomies();

Architecture

ExtraChillClient
├── Transport (swappable)
│   ├── FetchTransport        ← native fetch (RN, Node, browser)
│   └── WpApiFetchTransport   ← @wordpress/api-fetch (WP blocks)
└── Resources (typed endpoint groups)
    ├── auth       login, register, refresh, Google OAuth, browser handoff
    ├── artists    CRUD, links, socials, roster, subscribers, analytics
    ├── events     calendar, venues, geocode, submissions
    ├── blog       band name, rapper name, voting, AI adventure
    ├── community  drafts, upvotes, taxonomy counts
    ├── analytics  event tracking, summaries, link page analytics
    ├── media      upload, delete
    ├── shop       products, orders, Stripe Connect, shipping
    ├── users      search, leaderboard, onboarding
    ├── admin      access requests, memberships, team, QR codes
    ├── activity   feed, object hydration
    └── seo        config, audits

Two Entry Points

| Entry | Import | Dependencies | Use In | |-------|--------|-------------|--------| | Main | @extrachill/api-client | None | React Native, Node, browsers | | WordPress | @extrachill/api-client/wordpress | @wordpress/api-fetch | WordPress blocks |

The WordPress transport is a separate entry point so the main bundle stays dependency-free.

Types

All request/response types are exported from the main entry:

import type {
  Artist,
  CalendarEvent,
  LoginResponse,
  ShopProduct,
  ActivityItem,
} from '@extrachill/api-client';

These are the single source of truth — both web and mobile import from the same place.

Error Handling

import { ApiError } from '@extrachill/api-client';

try {
  await client.artists.getArtist(999);
} catch (error) {
  if (error instanceof ApiError) {
    console.log(error.code);    // 'not_found'
    console.log(error.status);  // 404
    console.log(error.message); // 'Artist not found'
  }
}

REST Namespace

All endpoints are under extrachill/v1. This client does not call datamachine/v1 directly — events data (calendar, venues, geocode) is accessed through Extra Chill wrapper endpoints that internally call Data Machine abilities. This keeps the API surface clean and Data Machine theme-agnostic.

Used By

  • extrachill-app — Expo/React Native mobile app
  • extrachill-artist-platform — Artist management blocks
  • extrachill-blog — Interactive blog blocks
  • extrachill-community — Community leaderboard
  • extrachill-users — Auth blocks
  • extrachill-events — Event submission, calendar, venues
  • extrachill-analytics — Analytics dashboard
  • extrachill-seo — SEO audit dashboard

License

GPL-2.0+