{"id":25065478,"url":"https://github.com/craigchilds94/rls-api-lib-php","last_synced_at":"2025-04-14T18:31:01.996Z","repository":{"id":56958664,"uuid":"62672014","full_name":"CraigChilds94/rls-api-lib-php","owner":"CraigChilds94","description":"Rocket League Stats PHP API Library","archived":false,"fork":false,"pushed_at":"2017-04-27T12:02:24.000Z","size":30,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T06:51:14.772Z","etag":null,"topics":["api","php","rocket-league"],"latest_commit_sha":null,"homepage":null,"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/CraigChilds94.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":"2016-07-05T21:50:29.000Z","updated_at":"2023-08-30T06:32:00.000Z","dependencies_parsed_at":"2022-08-21T09:50:26.857Z","dependency_job_id":null,"html_url":"https://github.com/CraigChilds94/rls-api-lib-php","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/CraigChilds94%2Frls-api-lib-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CraigChilds94%2Frls-api-lib-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CraigChilds94%2Frls-api-lib-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CraigChilds94%2Frls-api-lib-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CraigChilds94","download_url":"https://codeload.github.com/CraigChilds94/rls-api-lib-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248936541,"owners_count":21186044,"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","php","rocket-league"],"created_at":"2025-02-06T19:27:21.379Z","updated_at":"2025-04-14T18:31:01.972Z","avatar_url":"https://github.com/CraigChilds94.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rls-api (PHP Implementation)\n[![Build Status](https://travis-ci.org/CraigChilds94/rls-api-lib-php.svg?branch=master)](https://travis-ci.org/CraigChilds94/rls-api-lib-php)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d144189b50e742faa1a864ca3c222050)](https://www.codacy.com/app/craigchilds94/rls-api-lib-php?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=CraigChilds94/rls-api-lib-php\u0026amp;utm_campaign=Badge_Grade)\n\nThis is the un-official PHP client library for the RocketLeagueStats API.\n\n### Installation\n```\ncomposer require craigchilds/rls-api\n```\n\n### Usage\n\nHere are a few examples of how you can use the api to fetch different types of data.\n\n##### Fetching a list of the playlists\n```php\nuse RocketLeagueStats\\Stats as Api;\n\n$api = new Api([\n    'api_key' =\u003e 'your_api_key_here'\n]);\n\n$playlists = $api-\u003eplaylists()-\u003etoCollection();\n```\n\n##### Fetching a player by platform \u0026 name\n```php\nuse RocketLeagueStats\\Stats as Api;\nuse RocketLeagueStats\\Data\\Platform;\n\n$api = new Api([\n    'api_key' =\u003e 'your_api_key_here'\n]);\n\n$player = $api-\u003eplayer(Platform::PS4, 'PS4_UserNameHere');\n```\n\n##### Searching for a player on any platform\n```php\nuse RocketLeagueStats\\Stats as Api;\n\n$api = new Api([\n    'api_key' =\u003e 'your_api_key_here'\n]);\n\n$results = $api-\u003esearch('UserNameHere')-\u003etoCollection();\n```\n\n##### Environment Variables\n\nIf you want you can supply the api key through an environment variable. Lets say, if you had [DotEnv](https://github.com/vlucas/phpdotenv) installed on your project you could add the entry to your `.env` file.\n\n```\nRLS_API_KEY=\"rls_api_key_here\"\n```\n\nAnd then you will not need to pass it in the constructor of the `RocketLeagueStats\\Stats` class. Here is an example batch player request without passing the api key:\n\n```php\nuse RocketLeagueStats\\Stats as Api;\nuse RocketLeagueStats\\Data\\Collection;\n\n$api = new Api();\n\n$players = new Collection([\n    ['player' =\u003e 'UserName1', 'platform' =\u003e Platform::PS4],\n    ['player' =\u003e 'UserName1', 'platform' =\u003e Platform::Steam],\n]);\n\n$allPlayers = $api-\u003ebatch($players);\n```\n\n### Links\n * [Example](https://github.com/CraigChilds94/rls-api-lib-php/blob/master/example.php)\n * [API Documentation](http://documentation.rocketleaguestats.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigchilds94%2Frls-api-lib-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraigchilds94%2Frls-api-lib-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigchilds94%2Frls-api-lib-php/lists"}