{"id":21228767,"url":"https://github.com/martincarrera/clashapi","last_synced_at":"2026-04-12T07:36:05.443Z","repository":{"id":66173527,"uuid":"85995790","full_name":"martincarrera/clashapi","owner":"martincarrera","description":":crown: NPM package to consume Clash Royale API","archived":false,"fork":false,"pushed_at":"2017-05-12T02:36:05.000Z","size":56,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-15T04:25:53.061Z","etag":null,"topics":["clash","clash-royale","clash-royale-api","clashroyale","game","npm","npm-package","package","royale","supercell","unofficial"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/clashapi","language":"JavaScript","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/martincarrera.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-23T20:45:08.000Z","updated_at":"2020-02-07T02:39:09.000Z","dependencies_parsed_at":"2023-02-20T23:15:37.055Z","dependency_job_id":null,"html_url":"https://github.com/martincarrera/clashapi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/martincarrera/clashapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martincarrera%2Fclashapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martincarrera%2Fclashapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martincarrera%2Fclashapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martincarrera%2Fclashapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martincarrera","download_url":"https://codeload.github.com/martincarrera/clashapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martincarrera%2Fclashapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267046761,"owners_count":24026906,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["clash","clash-royale","clash-royale-api","clashroyale","game","npm","npm-package","package","royale","supercell","unofficial"],"created_at":"2024-11-20T23:21:47.227Z","updated_at":"2026-04-12T07:36:00.404Z","avatar_url":"https://github.com/martincarrera.png","language":"JavaScript","funding_links":["http://patreon.com/martincarrera)!"],"categories":[],"sub_categories":[],"readme":"# [Clashapi](https://www.npmjs.com/package/clashapi/)\n\nA npm package for [Clash Royale](http://supercell.com/en/games/clashroyale/) that consumes [clashapi](http://clashapi.xyz/) using [trae](https://github.com/Huemul/trae) to provide information about the game.\n\n## Content\n\n1. [How to use](#how-to-use)\n    1. [Install](#install)\n    2. [Basic Usage](#basic-usage)\n    3. [Methods](#methods)\n2. [Want to help](#want-to-help)\n3. [License](#license)\n\n## How to use?\n\nConsume the API to get all the information you need.\n\n### Install\n\n```\n$ npm install --save clashapi\n```\n\n```\n$ yarn add clashapi\n```\n\n### Basic usage\n\nIf you are not using [trae](https://github.com/Huemul/trae) (Pro tip: give it a try):\n\n```js\nimport clashapi from 'clashapi'\n\nclashapi.chests()\n  .then(...)\n```\n\nIf you are using [that awesome library](https://github.com/Huemul/trae):\n\n```js\nimport trae from 'trae'\nimport clashapiFactory from 'clashapi/factory'\n\nconst clashapi = clashapiFactory(trae)\n\nclashapi.chests()\n  .then(...)\n```\n\n### Methods\n\n| Method | Description |\n|---|---|\n| `clashapi.arenas()` | All Arenas information |\n| `clashapi.arenas(:id)` | Single Arena information |\n| `clashapi.arenas(:idName)` | Single Arena information |\n| `clashapi.cards` | All Cards information |\n| `clashapi.cards(:id)` | Single Card information |\n| `clashapi.cards(:idName)` | Single Card information |\n| `clashapi.chests` | All Chests information |\n| `clashapi.chests(:id)` | Single Chest information |\n| `clashapi.chests(:idName)` | Single Chest information |\n| `clashapi.leagues` | All Leagues information |\n| `clashapi.leagues(:id)` | Single League information |\n| `clashapi.leagues(:idName)` | Single League information |\n| `clashapi.players` | All Players levels information |\n| `clashapi.players(:id)` | Player level information |\n| `clashapi.players(:idName)` | Player level information |\n\n### Examples\n\n```js\nclashapi\n  .chests() // returns all chests\n  \nclashapi\n  .cards('royale-giant') // returns information about the royale giant\n\nclashapi\n  .leagues() // returns all the leagues\n  .then(leagues =\u003e leagues[0]._id) // returns the first league id\n  .then(clashapi.leagues) // returns the information for the first league, sending the id to the API\n```\n\n## Want to help?\n\nCreate an issue to report bugs or give suggestions on how to improve this project.\n\nIf you like the package, please star this repository and/or [the API repository](https://github.com/martincarrera/clash-royale-api).\n\nIf you create an app using this package, please mention that you are using [clashapi](http://clashapi.xyz) and add your app to the table on [the API repository](https://github.com/martincarrera/clash-royale-api).\n\nIf you want to contribute to the package, feel free to create a pull request.\n\nIf you ❤️ the API, [help me pay the API hosting](http://patreon.com/martincarrera)!\n\n## License\n\n[MIT License](https://github.com/martincarrera/clashapi/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartincarrera%2Fclashapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartincarrera%2Fclashapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartincarrera%2Fclashapi/lists"}