Skip to main content

Bsport

@magistr/bsportv2026.10.25.10· MIT· 6d agoBEHAVIORS
01README

bsport member API client — read the class calendar (with waitlist sizing), your upcoming/past bookings, registered offers, and your waitlist positions; email/password login → Token auth, DRF pagination, and 429 back-off

02Release Notes

2026.10.25.10

  • Repo-wide republish; no functional change.
03Behaviors1
@magistr/bsportv2026.10.25.10extensions/models/bsport.ts

Global Arguments

ArgumentTypeDescription
token?stringA DRF auth token (sent as `Authorization: Token <token>`). When set, the
email?stringMember login email (used only when `token` is not set). Vault ref:
password?stringMember login password (used only when `token` is not set). Vault ref:
companyIdstringStudio company id (the `company` filter on the calendar), e.g. "1234".
memberId?stringThis member's numeric id (the `member` filter on /booking/). Required by
consumerId?stringThis member's numeric consumer id (the `consumer` filter on the waitlist
baseUrl?stringAPI host without trailing slash (production shown by default).
authPath?stringPath prefix of the authentication service under baseUrl.
timeoutMs?numberPer-request fetch timeout in milliseconds.
maxRetries?numberHow many times to retry a request after an HTTP 429 rate-limit response.
userAgent?stringUser-Agent header sent on all outbound requests.
fn listEstablishments()
List the company's establishments/venues (GET /book/v1/establishment/
fn listOffers(establishments?: array, levels?: array, activities?: array, coaches?: array, onlyFutureStrict?: boolean, maxResults?: number, pageSize?: number)
List calendar offers (GET /book/v1/offer/) in a date window,
ArgumentTypeDescription
establishments?arrayFilter by establishment id(s) (maps to establishments=…).
levels?arrayFilter by level id(s) (maps to levels=…).
activities?arrayFilter by meta-activity id(s) (maps to activity__in=…).
coaches?arrayFilter by coach id(s) (maps to coaches=…).
onlyFutureStrict?booleanRestrict to strictly-future offers (maps to only_future_strict).
maxResults?numberUpper bound on offers retrieved across all pages.
pageSize?numberOffers per page request.
fn getOffers(ids: array)
Fetch specific offers by id (GET /book/v1/offer/?id__in=…). Writes
ArgumentTypeDescription
idsarrayOffer id(s) to fetch (maps to id__in=…).
fn listFutureBookings(maxResults?: number, pageSize?: number)
List the member's upcoming bookings (GET /book/v1/booking/ with
ArgumentTypeDescription
maxResults?numberUpper bound on bookings retrieved across all pages.
pageSize?numberBookings per page request.
fn listPastBookings(maxResults?: number, pageSize?: number)
List the member's past bookings (GET /book/v1/booking/ with
ArgumentTypeDescription
maxResults?numberUpper bound on bookings retrieved across all pages.
pageSize?numberBookings per page request.
fn listMyWaitlist(maxResults?: number, pageSize?: number)
List the member's own waitlist entries
ArgumentTypeDescription
maxResults?numberUpper bound on bookings retrieved across all pages.
pageSize?numberBookings per page request.
fn listRegisteredOffers()
List offers the member is registered for, booked or waitlisted
fn listWaitlist(offerIds?: array)
List the member's waitlist positions
ArgumentTypeDescription
offerIds?arrayOffer id(s) to check waitlist position for. When omitted, the method

Resources

offer(infinite)— One bsport offer (calendar class), including booking counts and
booking(infinite)— One of the member's own bookings (factory output).
waitlistPosition(infinite)— The member's waitlist position on one offer.
establishment(infinite)— One studio establishment (venue) of the company.
waitlistEntry(infinite)— One of the member's own waitlist booking-options (from the
summary(infinite)— Per-operation summary: scope, filters, count, and item ids.
04Previous Versions9
2026.10.15.9MIT

2026.10.15.9

Changed

  • Repo-wide maintenance release: version bump to republish the current source. No schema change.
2026.10.15.8MIT

2026.10.15.8

Changed

  • Repo-wide maintenance release: version bump to republish the current source. No schema change.
2026.10.15.6MIT

2026.10.15.6

Changed

  • Repo-wide maintenance release: version bump to republish the current source. No schema change.
2026.10.15.5MIT

2026.10.15.5

Changed

  • Repo-wide maintenance release: version bump to republish the current source. No schema change.
2026.10.15.4MIT

2026.10.15.4

Changed

  • Repo-wide maintenance release: version bump to republish the current source. No schema change.
2026.10.15.3MIT

2026.10.15.3

Changed

  • Repo-wide maintenance release: version bump to republish the current source. No schema change.
2026.10.15.2MIT

2026.10.15.2

Changed

  • Repo-wide maintenance release: version bump to republish the current source. No schema change.
2026.10.15.1MIT

2026.10.15.1

Changed

  • Repo-wide maintenance release: version bump to republish the current source. No schema change.
2026.09.15.1MIT

2026.09.15.1

First release.

  • Read-only member-API client for bsport studios: listOffers, getOffers, listEstablishments, listFutureBookings, listPastBookings, listMyWaitlist, listWaitlist, listRegisteredOffers. Each is a fan-out factory that writes one resource per item plus a summary.
  • Auth by a configured DRF token, or by email/password login against authPath. The token is held in memory only and never stored.
  • DRF page/page_size pagination, and retry on HTTP 429 per Retry-After.
  • Test suites: contract-fixture (against fixtures/), methods, adversarial, coverage and fast-check property tests. No test touches the network.

Fixed before release

  • companyId has no default: it is required, so the extension ships no particular studio. Set it to your studio's company id.
  • token and password are now declared sensitive, so swamp masks them.
  • listOffers rejects minDate/maxDate that are not YYYY-MM-DD. Before, free text went into the summary instance name.
  • Pagination stops when a page adds no new items. Before, a server that ignored page and kept sending next made the method loop forever.
  • summary.ids holds only real item ids. Before, items without an id added negative placeholder numbers; they still count toward total.
  • listMyWaitlist caps entries at maxResults, sets truncated, removes duplicate offer ids before the position lookup, and gives id-less entries distinct instance names. Before, it could exceed maxResults by one page, and id-less entries overwrote each other.
  • listFutureBookings/listPastBookings check memberId before they log in.
  • Retry-After in HTTP-date form is honoured. Before, it fell back to 1 s.
  • The request timeout now also covers reading the response body, and a non-JSON 2xx body gives a clear error.
  • baseUrl must be http/https with no embedded credentials.
05Stats
A
100 / 100
Downloads
19
Archive size
17.9 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
06Platforms
07Labels