Official libraries
TypeScript quickstart
Use the official TypeScript client
The official cfbd package provides generated TypeScript operations, types,
and a fetch client for working with the API.
Install the package
Code
Set your key in the server-side Node environment:
Code
Keep this example in a server-side Node process. Do not put an API key in frontend JavaScript, where users can inspect client-side code and network requests.
Retrieve games
This example retrieves the same Michigan games as GET /games?year=2023&team=Michigan:
Code
When the request succeeds, response.data contains generated game types.
Handle response.error according to your application's logging and retry
policy.
See the official source repository and the package on npm for the complete generated client reference and current package information.
Last modified on

