feat: add golfers.getFollowing() + fix auth docs from real-world GHIN integration#1
Open
Ryan4n6 wants to merge 7 commits into
Open
feat: add golfers.getFollowing() + fix auth docs from real-world GHIN integration#1Ryan4n6 wants to merge 7 commits into
Ryan4n6 wants to merge 7 commits into
Conversation
Add fetchCustomPath method to RequestClient mock and update tests to use it for fetching following golfers.
This document outlines the two-step authentication process for the GHIN API, detailing Firebase Authentication and GHIN Token Exchange, along with implementation examples and security notes.
This document provides a comprehensive reference for GHIN API endpoints used by this library, including paths, methods, query parameters, and response structures.
…n testing AUTHENTICATION.md: - Fix Step 1: was incorrectly documenting Firebase Identity Toolkit (identitytoolkit.googleapis.com/accounts:signInWithPassword) but the code actually uses Firebase Installations API (firebaseinstallations.googleapis.com/installations) - Document all three auth paths: Firebase+GHIN login (default), direct API login (apiAccess: true), and direct login without Firebase - Fix broken markdown formatting (nested numbered lists, indentation) - Add real-world D1 cache adapter example for serverless environments - Correct token TTL documentation (variable, not fixed 24h) API_ENDPOINTS.md: - Fix Get Course Details endpoint: was GetCourse.json, actually GetCourseDetails.json (matches codebase apiPathnames.course_details) - Add full GetCourseDetails response example with hole-by-hole data (verified against Saddleback Golf Club, courseId 24279) - Add breaking change notice: all endpoints require auth as of 2026 - Fix massive formatting issue: everything after "Following" section was accidentally in nested blockquotes, making it unreadable - Add combo tee set edge case documentation (empty Holes arrays) - Add Male/Female tee set merging guidance - Fix course_handicaps endpoint path (playing_handicaps.json) - Distinguish golfers/search.json from golfers.json endpoints Also runs biome format on 3 existing .ts files with indent issues. Findings from integrating @spicygolf/ghin with the TPS League platform (tpsleague.com) — a women's golf league management app using Cloudflare Workers + D1 that imports course data from GHIN for 39+ Colorado courses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
golfers.getFollowing()endpoint and significantly improves documentation based on real-world integration testing with a production Cloudflare Workers app.New Feature
golfers.getFollowing(ghinNumber)— Fetch the list of golfers a user is following (discovered via network traffic inspection on ghin.com)fetchCustomPathDocumentation Fixes (from real-world testing)
AUTHENTICATION.md — critical corrections:
identitytoolkit.googleapis.com/accounts:signInWithPassword), but the code actually uses Firebase Installations API (firebaseinstallations.googleapis.com/installations). These are completely different APIs.apiAccess: true), and direct login without Firebase tokenAPI_ENDPOINTS.md — corrections and additions:
GetCourse.json, actuallyGetCourseDetails.json(matchesapiPathnames.course_detailsin source)GetCourseDetailsresponse example with hole-by-hole data (real data from Saddleback Golf Club, courseId 24279)golfers/search.jsonworked unauthenticated)Holesarrays on "Black/Gold" style tees)course_handicapsendpoint path (playing_handicaps.json)golfers/search.jsonfromgolfers.jsonendpointsCode Quality
biome formaton 3 existing.tsfiles with indent inconsistenciesContext
These findings come from integrating
@spicygolf/ghinwith the TPS League platform — a women's golf league management app (Cloudflare Workers + D1) that imports course data from GHIN for 39+ Colorado Front Range courses. The auth documentation discrepancies were discovered when the server-side GHIN proxy was built to handle token lifecycle for bulk course imports.Test plan
bun run test:run)getFollowing()tests pass with mockedfetchCustomPathbiome checkclean (0 errors)tsctype check passestsupbuild succeeds (CJS + ESM + DTS)src/client/request-client/index.tsimplementation🤖 Generated with Claude Code