Skip to content

docs: document full StatboticsClient API surface and retry behavior#5

Merged
Project516 merged 1 commit into
Project516:mainfrom
cappy-dev:docs/expand-readme-api-surface
Jul 16, 2026
Merged

docs: document full StatboticsClient API surface and retry behavior#5
Project516 merged 1 commit into
Project516:mainfrom
cappy-dev:docs/expand-readme-api-surface

Conversation

@cappy-dev

Copy link
Copy Markdown
Contributor

On behalf of @Project516

Summary

The README only documented two of the five public methods on StatboticsClient. This expands the docs so the full API surface is discoverable without reading the source:

  • Added an Installation section (pub.dev package + Git fallback), matching the style used in tba_client and firestore_client.
  • Added an API reference section listing all five methods in a table with their REST endpoints and return types:
    • getEvent (was missing)
    • getEvents
    • getEventTeams
    • getEventTeamsBasic (was missing)
    • getEventMatches (was missing)
  • Documented the per-method sort order (rank, week/name, comp level then match number) and the 404 -> empty-list / null behavior.
  • Added a Retries and backoff section covering the 429/5xx retry with exponential backoff, the maxAttempts default, the sleep seam for tests, and that 4xx is not retried.
  • Mentioned the close() lifecycle method in the quick-start example and the API reference intro.

Verification

  • README-only change; no source or test code touched.
  • Verified no em dashes or non-ASCII characters were introduced.
  • API details cross-checked against lib/src/statbotics_client.dart and the existing tests in test/statbotics_client_test.dart (retry behavior matches the retries a transient 500 then succeeds (#496) test, and sort orders match the implementations).

The README only listed getEvents and getEventTeams, but the client exposes
five public methods (getEvent, getEvents, getEventTeams, getEventTeamsBasic,
getEventMatches). Add an installation section, an API reference table
covering all five methods with their endpoints and return types, the
per-method sort order, and a section on the transient-retry backoff and
the close() lifecycle method.
@cappy-dev

Copy link
Copy Markdown
Contributor Author

cc @Project516

@Project516
Project516 merged commit d63de33 into Project516:main Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants