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

bowlslink-client

v0.3.1

Published

Client library for the BowlsLink Results API — fetch club entries, matches, ladders, and team sheets.

Downloads

411

Readme

bowlslink-client

A TypeScript client library for the BowlsLink Results API. Fetch pennant teams, match results, ladder standings, and team sheets for any Australian bowls club.

Built for club website maintainers who want to display live pennant data without reverse-engineering the API themselves.

Install

npm install bowlslink-client

Quick Start

import { BowlsLinkClient } from "bowlslink-client";

const client = new BowlsLinkClient({
  clubId: "2d83742c-5153-4f22-bcb3-68868f34e0d2", // Your club's BowlsLink UUID
});

// Get all pennant teams, matches, and standings
const data = await client.getPennantData();

for (const team of data.teams) {
  console.log(`${team.name} — ${team.competitionName}`);
  console.log(`  Ladder: ${team.ladder?.position ?? "?"} (W${team.ladder?.wins} L${team.ladder?.losses})`);
  console.log(`  Matches: ${team.matches.length}`);
}

// Get team sheets (player/rink data) for a specific match
const detail = await client.getMatchDetail("c0acaf56-ec90-4112-ac48-9d1d8412e7d8");

for (const team of detail.teams) {
  console.log(`\n${team.teamName}`);
  for (const rink of team.rinks) {
    console.log(`  ${rink.label}: ${rink.players.map((p) => `${p.name} (${p.position})`).join(", ")}`);
  }
}

Finding Your Club ID

Your club's BowlsLink UUID is in the URL when you view your club on the results site:

https://results.bowlslink.com.au/club/2d83742c-5153-4f22-bcb3-68868f34e0d2
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                       This is your club ID

You can also find it by searching for your club at results.bowlslink.com.au/search.

API

new BowlsLinkClient(config)

| Option | Type | Required | Description | |--------|------|----------|-------------| | clubId | string | ✅ | Your club's BowlsLink UUID | | baseUrl | string | | API base URL (default: https://api.bowlslink.com.au/results-api) | | fetch | typeof fetch | | Custom fetch implementation for testing or non-browser environments |

client.getPennantData(): Promise<PennantData>

Returns all active pennant entries for the club with competition details, ladder standings, and match history including finals.

interface PennantData {
  lastUpdated: string;  // ISO 8601 timestamp
  teams: Team[];
}

interface Team {
  name: string;                    // e.g. "Keilor 1"
  competitionId: string;
  competitionName: string | null;  // e.g. "2025-26 Metro Pennant Weekend Division 2"
  competitionStatus: string | null;
  bowlslinkUrl: string;            // Link to competition on BowlsLink
  ladder: LadderEntry | null;
  matches: Match[];
}

interface Match {
  matchId: string;
  round: number;
  roundLabel: string;       // "Round 1", "Semi-Finals", "Grand Final", etc.
  dateUtc: number;          // Unix timestamp
  state: string;            // "PLAYED" | "SCHEDULED" | etc.
  isHome: boolean;
  isFinals: boolean;        // true for finals-series matches
  opponent: string;
  opponentId: string;
  myCompetitorId: string;
  teamScore: number | null;
  opponentScore: number | null;
  outcome: "W" | "L" | "draw" | "np" | null;
  teamPoints: number | null;
}

client.getMatchDetail(matchId): Promise<MatchDetail>

Returns team sheets with rink and player data for a specific match.

interface MatchDetail {
  matchId: string;
  teams: MatchTeam[];
}

interface MatchTeam {
  competitorId: string;
  teamName: string;
  rinks: Rink[];
}

interface Rink {
  label: string;       // "Rink 1", "Rink 2", etc.
  players: Player[];   // Sorted: lead, second, third, skip
}

interface Player {
  name: string;
  position: string;    // "lead" | "second" | "third" | "skip"
}

Known Quirks

Things we've discovered about the BowlsLink API that this library handles for you:

  • Finals are a separate endpoint. Regular season matches come from /competition/{id}/matches, but finals come from /competition/{id}/finals-series-matches. This library fetches both and merges them.

  • Higher-division finals are separate competitions. Divisions 1–3 have their finals as entirely separate competition entries (e.g. "Division 2 Finals (Divisional)"). The regular season competition moves to completed status and drops off the active club entries feed. Lower divisions (4+) keep finals within the same competition using the isFinalsSeries flag.

  • Ladder API only returns pool 1. In multi-section competitions, the /ladder endpoint only returns standings for Section 1. For teams in other sections, this library automatically computes standings from match results as a fallback.

  • The API is public but undocumented. These endpoints are reverse-engineered from the BowlsLink SPA. They could change without notice.

Server-Side Usage

The BowlsLink API has CORS headers allowing browser access, but for club websites we recommend calling it server-side to avoid exposing your requests to rate limiting and to enable caching:

import express from "express";
import { BowlsLinkClient } from "bowlslink-client";

const app = express();
const client = new BowlsLinkClient({ clubId: "your-club-id" });

let cache = null;
const CACHE_TTL = 10 * 60 * 1000; // 10 minutes

app.get("/api/pennant", async (req, res) => {
  if (cache && Date.now() - cache.timestamp < CACHE_TTL) {
    return res.json(cache.data);
  }
  const data = await client.getPennantData();
  cache = { data, timestamp: Date.now() };
  res.json(data);
});

License

MIT