{"id":23739877,"url":"https://github.com/jharrilim/balldontlie-client","last_synced_at":"2025-09-04T15:31:52.830Z","repository":{"id":34923971,"uuid":"191044936","full_name":"jharrilim/balldontlie-client","owner":"jharrilim","description":"Javascript client for retrieving NBA stats with the balldontlie API.","archived":false,"fork":false,"pushed_at":"2023-01-03T23:45:57.000Z","size":1019,"stargazers_count":11,"open_issues_count":14,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-14T00:37:04.308Z","etag":null,"topics":["api","async","ball","basketball","client","dont","generator","javascript","lie","nba","stats"],"latest_commit_sha":null,"homepage":"https://jharrilim.github.io/balldontlie-client","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jharrilim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-09T19:09:23.000Z","updated_at":"2024-10-29T13:40:04.000Z","dependencies_parsed_at":"2023-01-15T10:31:37.211Z","dependency_job_id":null,"html_url":"https://github.com/jharrilim/balldontlie-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fballdontlie-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fballdontlie-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fballdontlie-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fballdontlie-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jharrilim","download_url":"https://codeload.github.com/jharrilim/balldontlie-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231970931,"owners_count":18453925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","async","ball","basketball","client","dont","generator","javascript","lie","nba","stats"],"created_at":"2024-12-31T09:39:43.469Z","updated_at":"2024-12-31T09:39:44.022Z","avatar_url":"https://github.com/jharrilim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# balldontlie-client\n\n[![Build Status]](https://dev.azure.com/josephharrisonlim/josephharrisonlim/_build/latest?definitionId=2\u0026branchName=master)\n[![NPM Badge]](https://www.npmjs.com/package/@jharrilim/balldontlie-client)\n[![NPM Downloads]](https://www.npmjs.com/package/@jharrilim/balldontlie-client)\n\nJavascript client for [Balldontlie](https://github.com/ynnadkrap/balldontlie). \n\nAPI Docs for this client can be found [here](https://jharrilim.github.io/balldontlie-client/classes/_api_v1_index_.v1client.html).\n\n![Rasheed Wallace - Ball Dont Lie](https://media.giphy.com/media/Jm2hosNfVeNjy/giphy.gif)\n\n\n\n## API Implementation Status\n\n|                                                            API | Status |\n| -------------------------------------------------------------: | :----- |\n|                 [Players](https://www.balldontlie.io/#players) | ✅      |\n|                     [Teams](https://www.balldontlie.io/#teams) | ✅      |\n|                     [Games](https://www.balldontlie.io/#games) | ✅      |\n|                     [Stats](https://www.balldontlie.io/#stats) | ✅      |\n| [Season Averages](https://www.balldontlie.io/#season-averages) | ✅      |\n\n## Install\n\n```sh\nnpm i @jharrilim/balldontlie-client\n```\n\n## Usage\n\nThis library uses async generators for handling pagination. You may use this in conjunction with\n[for-await-of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of)\nto make multiple API requests. You may also request for one page at a time by awaiting `.next()`.\n\nAxios is used interally, and axios configuration options may be passed into `.v1()` if needed.\n\n\u003e Warning: This API is rate limited. You may only make up to [60 requests per minute](http://www.balldontlie.io/#getting-started).\n\n### Example with for-await-of\n\n```js\nimport { BallDontLie } from '@jharrilim/balldontlie-client';\n\nvoid async function main() {\n    const v1Client = BallDontLie.v1();\n    for await(const teams of v1Client.teams(0)) {\n        // paginate through all the teams\n        for(const team of teams) {\n            console.log(team.full_name);\n        }\n    }\n}().catch(console.error);\n```\n\n### Example with .next()\n\n```js\nimport { BallDontLie } from '@jharrilim/balldontlie-client';\n\nvoid async function main() {\n    const v1Client = BallDontLie.v1();\n    const teamGenerator = v1Client.teams(0, 10); // starting from 0, 10 per page\n    \n    const teams1 = (await teamGenerator.next()).value; // get the first 10 teams\n    teams1.forEach(team =\u003e console.log(team.full_name));\n\n    const teams2 = (await teamGenerator.next()).value; // get the next 10 teams after the first 10\n    teams2.forEach(team =\u003e console.log(team.full_name));\n\n}().catch(console.error);\n```\n\nMore examples can be found in the [tests](./test/integration/api.test.ts).\n\n[Build Status]: https://dev.azure.com/josephharrisonlim/josephharrisonlim/_apis/build/status/jharrilim.balldontlie-client?branchName=master\n\n[NPM Badge]: https://img.shields.io/npm/v/@jharrilim/balldontlie-client.svg\n[NPM Downloads]: https://img.shields.io/npm/dt/@jharrilim/balldontlie-client.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjharrilim%2Fballdontlie-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjharrilim%2Fballdontlie-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjharrilim%2Fballdontlie-client/lists"}