-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add plain JS lobby client (#728)
* feat(server): Create types for Lobby API data Closes #707 This creates types for data returned by the Lobby API and uses them to type the response bodies in the server-side router. * refactor(types): Include min and max players options in Game interface * refactor(lobby): Convert connection class to Typescript * feat(lobby): Create a plain JS LobbyClient LobbyClient is a lightweight wrapper around `fetch` calls to a boardgame.io Lobby API server. Apart from the server’s base URL, it is stateless and serves mainly to allow argument validation and to abstract away a few request details. Unlike plain fetch, requests will throw errors if they don’t return `ok` (i.e. status 2xx). * refactor(lobby): Use new LobbyClient class in React lobby connection * fix(lobby): Include missing import for React types * docs(api): Update Lobby docs to convert game to match more thoroughly * docs: Correct inline documentation block * docs: Update Lobby docs - Add examples with the plain JS client - Move the server config details to the Server doc * feat(lobby): Add support for listMatches filtering to client #740 added the ability to pass query string parameters to the listMatches API endpoint to filter the matches returned. This adds support for building the relevant query string to the lobby client’s listMatches method.
- Loading branch information
Showing
11 changed files
with
930 additions
and
170 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.