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

@thewfa/api-client

v0.5.9

Published

Powerchair football API client

Downloads

413

Readme

WFA API Client (Powerchair Football) - COMING SOON

THE API IS CURRENTLY UNRELEASED

A TypeScript/JavaScript client for accessing Wheelchair Football Association (WFA) data.

This library aims to provide a clean, typed interface to the WFA API with first‑class TypeScript support, ESM/CJS builds, and friendly DX.


Features

  • ✅ TypeScript types for requests and responses
  • ✅ ESM & CommonJS builds
  • ✅ Token-based auth (Authorization: Token <token>)
  • ✅ Built-in helpers for common queries (matches, teams, competitions, etc.)
  • ✅ Works in Node 18+ and modern browsers

Installation

# npm
npm install @thewfa/api-client

# or pnpm
pnpm add @thewfa/api-client

# or yarn
yarn add @thewfa/api-client

# or bun
bun add @thewfa/api-client

Authentication

  1. Create an application and generate an access token in the Developer Portal:

  2. Pass your token to the client. The client will send it as:

Authorization: Token <your_access_token>

Never commit tokens to source control. Prefer environment variables.


Quick Start

TypeScript / ESM

import { MatchDayClient } from '@thewfa/api-client';

// Prefer loading the token from env vars or your secret store
const client = new MatchDayClient({
  token: process.env.WFA_API_TOKEN!,
});

// List the latest matches
await client.matches.list({
  orderBy: { date: 'desc' },
  limit: 20,
});

// Fetch a single match by ID
const match = await client.matches.get('match_123');
console.log(match.details.homeTeam.name, match.details.awayTeam.name);

CommonJS

const { MatchDayClient } = require('@thewfa/api-client');

const client = new MatchDayClient({ token: process.env.WFA_API_TOKEN });

client.matches
  .list({ limit: 10 })
  .then(res => console.log(res))
  .catch(err => console.error(err));

Options

type WfaClientOptions = {
  /** Required: access token from the developer portal */
  token: string;
  /** Optional: API base URL override (defaults to the official base) */
  baseUrl?: string;
};

Errors & Retries

  • Network and HTTP errors throw APIError with:

  • message (human‑readable)

  • data (parsed error body when available)

  • Add your own retry policy with a wrapper (e.g., p-retry).

try {
  await client.matches.get('bad_id');
} catch (e) {
  if (e instanceof NotFoundError) {
    // not found
  }
}

Development

# Build
npm run build

# Lint & format
npm run lint
npm run format

# Tests (if present)
npm test

FAQ

Q: Where do I get a token? A: From the Developer Portal → https://developers.thewfa.org.uk.

Q: Which header should I send? A: Authorization: Token <access_token>.

Q: Which Node versions are supported? A: Node 18+ natively (for built‑in fetch)

Q: What’s the base URL? A: The client defaults to the official WFA API base. You can override it via baseUrl if the docs specify a different environment. This can be useful for testing.


Links


License

MIT © WFA / Contributors