https://github.com/kamaal111/clash-royale-stats-api-server-express
A API to provide Clash Royale statistics, built in Express.js and using MongoDB.
https://github.com/kamaal111/clash-royale-stats-api-server-express
api clash-royale clash-royale-api express mongodb nodejs supercell
Last synced: 3 months ago
JSON representation
A API to provide Clash Royale statistics, built in Express.js and using MongoDB.
- Host: GitHub
- URL: https://github.com/kamaal111/clash-royale-stats-api-server-express
- Owner: kamaal111
- License: mit
- Created: 2018-12-27T21:21:21.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2023-01-23T21:58:07.000Z (over 3 years ago)
- Last Synced: 2025-10-21T05:49:08.408Z (9 months ago)
- Topics: api, clash-royale, clash-royale-api, express, mongodb, nodejs, supercell
- Language: JavaScript
- Homepage:
- Size: 6.07 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clash Royale stats API
An API that provides [Clash Royale](http://supercell.com/en/games/clashroyale/) statistics.
## What can it do?
- Basic actions:
- Fetch and save player and clan statistics
- Fetch and save players latest battlelogs
- Fetch and save players upcomming chests
## Primarily used technologies
- [Express.js](https://expressjs.com)
- [Node.js](https://nodejs.org/en/)
- [MongoDB](https://www.mongodb.org/)
- [Superagent](http://visionmedia.github.io/superagent/)
## Endpoints
| Route | HTTP Verb | Description |
| ------------------------------ | --------- | ----------------------------------------------------------- |
| `/v1/api/player/:id` | `PUT` | Update players statistics, upcomming chests and battlelogs |
| `/v1/api/player/chests/:id` | `GET` | Find players upcomming chests |
| `/v1/api/player/battlelog/:id` | `GET` | Find players latest battlelogs |
| `/v1/api/player/player/:id` | `GET` | Find players statistics |
| `/v1/api/clan/:id` | `PUT` | Update clans statistics, warlogs and current war statistics |
| `/v1/api/clan/data/:id` | `GET` | Find clans statistics |
| `/v1/api/clan/warlog/:id` | `GET` | Find clans latest warlogs |
| `/v1/api/clan/curwar/:id` | `GET` | Find clans current war statistics |
## Installation
### Running the API locally
- Make sure you have installed all these prerequisites on your development machine.
- [Node.js](https://nodejs.org/en/download/)
- [MongoDB](https://www.mongodb.org/)
- Register and generate your free API key [here](https://developer.clashroyale.com)
```bash
> git clone git@github.com:kamaal111/clash-royale-stats-api-express.git
> cd clash-royale-stats-api-express
> npm install
```
- Modify config.js in the root directory with your credentials
```bash
> npm run dbon
```
- In an separate terminal run
```bash
> npm run watch
```
- Enjoy!!!