{"id":16411613,"url":"https://github.com/slvler/balldontlie-service","last_synced_at":"2025-03-23T06:31:06.823Z","repository":{"id":177719629,"uuid":"660762337","full_name":"slvler/balldontlie-service","owner":"slvler","description":"balldontlie.io api service","archived":false,"fork":false,"pushed_at":"2024-10-20T09:26:40.000Z","size":19,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T18:21:34.607Z","etag":null,"topics":["api","api-client","api-service","balldontlie","balldontlie-api","laravel","laravel-package","laravel-service"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slvler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-30T19:27:45.000Z","updated_at":"2024-10-20T09:26:19.000Z","dependencies_parsed_at":"2023-11-07T04:04:51.899Z","dependency_job_id":null,"html_url":"https://github.com/slvler/balldontlie-service","commit_stats":null,"previous_names":["slvler/balldontlie-service"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slvler%2Fballdontlie-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slvler%2Fballdontlie-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slvler%2Fballdontlie-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slvler%2Fballdontlie-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slvler","download_url":"https://codeload.github.com/slvler/balldontlie-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066496,"owners_count":20555402,"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","api-client","api-service","balldontlie","balldontlie-api","laravel","laravel-package","laravel-service"],"created_at":"2024-10-11T06:45:59.241Z","updated_at":"2025-03-23T06:31:06.305Z","avatar_url":"https://github.com/slvler.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# balldontlie Service\n\n[![tests](https://github.com/slvler/balldontlie-service/actions/workflows/tests.yml/badge.svg)](https://github.com/slvler/balldontlie-service/actions/workflows/tests.yml)\n[![Latest Stable Version](https://poser.pugx.org/slvler/balldontlie-laravel/v)](https://packagist.org/packages/slvler/balldontlie-laravel)\n[![Latest Unstable Version](https://poser.pugx.org/slvler/balldontlie-laravel/v/unstable)](https://packagist.org/packages/slvler/balldontlie-laravel)\n[![License](https://poser.pugx.org/slvler/balldontlie-laravel/license)](https://packagist.org/packages/slvler/balldontlie-laravel)\n[![Total Downloads](https://poser.pugx.org/slvler/balldontlie-laravel/downloads)](https://packagist.org/packages/slvler/balldontlie-laravel)\n\nThis package provides a convenient wrapper to the [Balldontlie API](https://www.balldontlie.io/home.html#introduction)  for Laravel applications.\n\n## Requirements\n\n- PHP 8.0+\n- Laravel 9.x\n\n## Installation\n\nTo install this package tou can use composer:\n\n```bash\ncomposer require slvler/balldontlie-laravel\n```\n\n## Usage\n\n#### Find player\n```php\nBalldontlie::players(237);\n```\nit returns an json with player:\n```json\n{\n  \"data\":[\n    {\n      \"id\":237,\n      \"first_name\":\"LeBron\",\n      \"last_name\":\"James\",\n      \"position\":\"F\",\n      \"height_feet\": 6,\n      \"height_inches\": 8,\n      \"weight_pounds\": 250,\n      \"team\":{\n        \"id\":14,\n        \"abbreviation\":\"LAL\",\n        \"city\":\"Los Angeles\",\n        \"conference\":\"West\",\n        \"division\":\"Pacific\",\n        \"full_name\":\"Los Angeles Lakers\",\n        \"name\":\"Lakers\"\n      }\n    }\n ],\n \"meta\": {\n    \"total_pages\": 50,\n    \"current_page\": 1,\n    \"next_page\": 2,\n    \"per_page\": 25,\n    \"total_count\": 9999\n  }\n}   \n```\n\n#### Find team\n```php\nBalldontlie::teams(14);\n```\nit returns an json with team:\n```json\n{\n  \"data\": [\n    {\n      \"id\":14,\n      \"abbreviation\":\"LAL\",\n      \"city\":\"Los Angeles\",\n      \"conference\":\"West\",\n      \"division\":\"Pacific\",\n      \"full_name\":\"Los Angeles Lakers\",\n      \"name\":\"Lakers\"\n    }\n  ],\n  \"meta\": {\n    \"total_pages\": 1,\n    \"current_page\": 1,\n    \"next_page\": null,\n    \"per_page\": 30,\n    \"total_count\": 30\n  }\n}\n```\n#### Find games\n```php\nBalldontlie::games(1);\n```\nit returns an json with games:\n```json\n{\n  \"data\": [\n    {\n      \"id\":1,\n      \"date\":\"2018-10-16T00:00:00.000Z\",\n      \"home_team_score\":105,\n      \"visitor_team_score\":87,\n      \"season\":2018,\n      \"period\": 4,\n      \"status\": \"Final\",\n      \"time\": \" \",\n      \"postseason\": false,\n      \"home_team\":{\n        \"id\":2,\n        \"abbreviation\":\"BOS\",\n        \"city\":\"Boston\",\n        \"conference\":\"East\",\n        \"division\":\"Atlantic\",\n        \"full_name\":\"Boston Celtics\",\n        \"name\":\"Celtics\"\n      },\n      \"visitor_team\":{\n        \"id\":23,\n        \"abbreviation\":\"PHI\",\n        \"city\":\"Philadelphia\",\n        \"conference\":\"East\",\n        \"division\":\"Atlantic\",\n        \"full_name\":\"Philadelphia 76ers\",\n        \"name\":\"76ers\"\n      }\n    }\n  ],\n  \"meta\": {\n    \"total_pages\": 1877,\n    \"current_page\": 1,\n    \"next_page\": 2,\n    \"per_page\": 25,\n    \"total_count\": 46911\n  }\n}\n```\n\n#### Find stats\n```php\nBalldontlie::stats();\n```\nit returns an json with stats:\n```json\n{\n  \"data\": [\n    {\n      \"id\":29,\n      \"ast\":2,\n      \"blk\":2,\n      \"dreb\":8,\n      \"fg3_pct\":0.25,\n      \"fg3a\":4,\n      \"fg3m\":1,\n      \"fg_pct\":0.429,\n      \"fga\":21,\n      \"fgm\":9,\n      \"ft_pct\":0.8,\n      \"fta\":5,\n      \"ftm\":4,\n      \"game\":{\n        \"id\":1,\n        \"date\":\"2018-10-16T00:00:00.000Z\",\n        \"home_team_id\":2,\n        \"home_team_score\":105,\n        \"season\":2018,\n        \"visitor_team_id\":23,\n        \"visitor_team_score\":87\n      },\n      \"min\":\"36:49\",\n      \"oreb\":2,\n      \"pf\":3,\n      \"player\":{\n        \"id\":145,\n        \"first_name\":\"Joel\",\n        \"last_name\":\"Embiid\",\n        \"position\":\"F-C\",\n        \"team_id\":23\n      },\n      \"pts\":23,\n      \"reb\":10,\n      \"stl\":1,\n      \"team\":{\n        \"id\":23,\n        \"abbreviation\":\"PHI\",\n        \"city\":\"Philadelphia\",\n        \"conference\":\"East\",\n        \"division\":\"Atlantic\",\n        \"full_name\":\"Philadelphia 76ers\",\n        \"name\":\"76ers\"\n      },\n      \"turnover\":5\n    }\n  ],\n  \"meta\": {\n    \"total_pages\": 2042,\n    \"current_page\": 1,\n    \"next_page\": 2,\n    \"per_page\": 25,\n    \"total_count\": 51045\n  }\n}\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Credits\n\n- [slvler](https://github.com/slvler)\n\n## License\n\nThe MIT License (MIT). Please see [License File](https://github.com/slvler/balldontlie-service/blob/main/LICENSE.md) for more information.\n\n## Contributing\nYou're very welcome to contribute. \nPlease see [CONTRIBUTING](https://github.com/slvler/balldontlie-service/blob/main/CONTRIBUTING.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslvler%2Fballdontlie-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslvler%2Fballdontlie-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslvler%2Fballdontlie-service/lists"}