1
No files matched your search
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"presets": ["es2015"]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"directory": "public/bower_components"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
/dist
|
||||
|
||||
# Dependency directory
|
||||
node_modules
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Environmental variables
|
||||
.env
|
||||
|
||||
# Bower Components
|
||||
public/bower_components/
|
||||
|
||||
.DS_Store
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Martín Carrera
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,138 @@
|
||||
# [Clash Royale API](http://www.clashapi.xyz/)
|
||||
|
||||
[](https://codeship.com/projects/153028) [](https://coveralls.io/github/martincarrera/clash-royale-api?branch=master)
|
||||
[](https://www.paypal.me/MartinCarrera)
|
||||
|
||||
A [Clash Royale](http://supercell.com/en/games/clashroyale/) API that provides information about the game.
|
||||
|
||||
> If you develop an app using this API, please submit a pull request adding it to the [apps table](#apps-that-use-this-api).
|
||||
|
||||
## Content
|
||||
|
||||
1. [How to use](#how-to-use)
|
||||
1. [Endpoints](#endpoints)
|
||||
2. [Images](#images)
|
||||
2. [Want to help](#want-to-help)
|
||||
3. [Development](#development)
|
||||
1. [Install](#install)
|
||||
2. [Run](#run)
|
||||
3. [Test](#test)
|
||||
4. [Apps that use this API](#apps-that-use-this-api)
|
||||
|
||||
## How to use
|
||||
|
||||
Consume the API to get all the information you need from these routes.
|
||||
|
||||
### Endpoints
|
||||
|
||||
[Base route](http://www.clashapi.xyz).
|
||||
|
||||
| Route | HTTP Verb | Description |
|
||||
|---|---|---|
|
||||
| [`/api/arenas`][1] | `GET` | All Arenas information |
|
||||
| `/api/arenas/:id` | `GET` | Single Arena information |
|
||||
| `/api/arenas/:idName` | `GET` | Single Arena information |
|
||||
| [`/api/cards`][2] | `GET` | All Cards information |
|
||||
| `/api/cards/:id` | `GET` | Single Card information |
|
||||
| `/api/cards/:idName` | `GET` | Single Card information |
|
||||
| [`/api/chests`][3] | `GET` | All Chests information |
|
||||
| `/api/chests/:id` | `GET` | Single Chest information |
|
||||
| `/api/chests/:idName` | `GET` | Single Chest information |
|
||||
| [`/api/leagues`][4] | `GET` | All Leagues information |
|
||||
| `/api/leagues/:id` | `GET` | Single League information |
|
||||
| `/api/leagues/:idName` | `GET` | Single League information |
|
||||
| [`/api/players`][5] | `GET` | All Players levels information |
|
||||
| `/api/players/:id` | `GET` | Player level information |
|
||||
| `/api/players/:idName` | `GET` | Player level information |
|
||||
| [`/api/random-deck`][6] | `GET` | Get a Random deck! |
|
||||
|
||||
[1]: http://www.clashapi.xyz/api/arenas
|
||||
[2]: http://www.clashapi.xyz/api/cards
|
||||
[3]: http://www.clashapi.xyz/api/chests
|
||||
[4]: http://www.clashapi.xyz/api/leagues
|
||||
[5]: http://www.clashapi.xyz/api/players
|
||||
[6]: http://www.clashapi.xyz/api/random-deck
|
||||
|
||||
### Images
|
||||
|
||||
You can get the images too! Thank you [MaherFa](https://github.com/MaherFa)!
|
||||
|
||||
| Route | Description |
|
||||
|---|---|
|
||||
| [`/images/arenas/${idName}.png`][7] | Arenas images |
|
||||
| [`/images/cards/${idName}.png`][8] | Cards images |
|
||||
| [`/images/chests/${idName}.png`][9] | Chests images |
|
||||
| [`/images/leagues/${idName}.png`][10] | Leagues images |
|
||||
|
||||
[7]: http://www.clashapi.xyz/images/arenas/royal-arena.png
|
||||
[8]: http://www.clashapi.xyz/images/cards/arrows.png
|
||||
[9]: http://www.clashapi.xyz/images/chests/super-magical-chest.png
|
||||
[10]: http://www.clashapi.xyz/images/leagues/ultimate-champion.png
|
||||
|
||||
## Want to help
|
||||
|
||||
If you like the API, please star this repository.
|
||||
|
||||
If you create an app using the API, please mention this repository and add it in the table below.
|
||||
|
||||
If you want to contribute to the API, feel free to create a pull request.
|
||||
|
||||
If you :heart: the API, [help me pay the hosting](https://www.paypal.me/MartinCarrera)!
|
||||
|
||||
## Development
|
||||
|
||||
Make sure you have installed all these prerequisites on your development machine.
|
||||
|
||||
* [Node.js](https://nodejs.org/en/download/)
|
||||
* [MongoDB](https://www.mongodb.org/)
|
||||
* [Nodemon](https://nodemon.io/)
|
||||
|
||||
### Install
|
||||
|
||||
```bash
|
||||
> git clone https://github.com/martincarrera/clash-royale-api.git
|
||||
> cd clash-royale-api
|
||||
> npm install
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
```bash
|
||||
> mongod
|
||||
> cd clash-royale-api
|
||||
> npm run dev
|
||||
```
|
||||
|
||||
If you don't have `Nodemon` installed
|
||||
|
||||
```bash
|
||||
> mongod
|
||||
> cd clash-royale-api
|
||||
> npm i -g nodemon
|
||||
> npm run dev
|
||||
```
|
||||
|
||||
### Test
|
||||
|
||||
```bash
|
||||
> npm test
|
||||
```
|
||||
|
||||
## Apps that use this API
|
||||
|
||||
| APP | DESCRIPTION | LINK |
|
||||
|:---:|:---:|:---:|
|
||||
| Randeck | Simple web app that generates random decks. | [Go!](http://randeck.xyz) |
|
||||
| Royale Plus | Facebook for Clash Royale players. | [Git!](https://github.com/AmirSavand/royale-plus) [Go!](http://royplus.herokuapp.com/)|
|
||||
| BarrePolice | A Telegram Bot based on plugins written in Lua |[Go!](https://t.me/BarrePolice_Bot) _& send /cr_ |
|
||||
| Clashapi | NPM package to consume this API | [Go!](https://www.npmjs.com/package/clashapi) |
|
||||
| Deck it | Deck builder app designed for Android | [Go!](https://play.google.com/store/apps/details?id=com.oryginal.deckit) |
|
||||
| Deck Generator for Echo Devices | Alexa skill to suggest a deck for clash royale for Amazon's Echo devices | [Go!](https://alexa.amazon.in/spa/index.html#skills/dp/B078WSRZWV/?ref=skill_dsk_skb_ca_24) |
|
||||
| Clash Royale Discord Bot | A Discord bot that displays informations depending of commands | [Go!](https://github.com/TorzuoliH/clash-royale-discord-bot) |
|
||||
| Deck Royale | A SPA using Vue that generates random decks. | [Git!](https://github.com/ikenami/Deck-Royale) [Go!](http://deck-royale-ultimate.herokuapp.com/) |
|
||||
| ClashElite | Simple app that gives info on chest cycles and generates random decks with copy and share feature. | [Go!](https://play.google.com/store/apps/details?id=com.wordpress.redmanandroid.clashelite) |
|
||||
|
||||
Made with :heart: by clash fans.
|
||||
|
||||
----------
|
||||
This content is not affiliated with, endorsed, sponsored, or specifically approved by Supercell and Supercell is not responsible for it. For more information see [Supercell’s Fan Content Policy](http://www.supercell.com/fan-content-policy).
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "clash-royale-api",
|
||||
"main": [
|
||||
"/dist/clash-royale-api.min.js",
|
||||
"/dist/clash-royale-api.min.css"
|
||||
],
|
||||
"version": "0.0.0",
|
||||
"description": "Clash Royale API",
|
||||
"authors": [
|
||||
"martincarrera"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"package.json",
|
||||
"gulpfile.js",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"src"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular": "latest",
|
||||
"angular-formly": "^8.2.0",
|
||||
"angular-formly-templates-bootstrap": "^6.3.2",
|
||||
"bootstrap": "^3.3.6",
|
||||
"angular-ui-router": "^0.2.18",
|
||||
"ng-notify": "^0.8.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "clashapi",
|
||||
"alias": [
|
||||
"clashapi.now.sh"
|
||||
],
|
||||
"type": "npm",
|
||||
"public": false
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "clash-royale-api",
|
||||
"main": "src/server.js",
|
||||
"license": "SEE LICENSE IN LICENSE FILE",
|
||||
"scripts": {
|
||||
"test": "istanbul cover node_modules/mocha/bin/_mocha tests/all.js",
|
||||
"dev": "nodemon server.js",
|
||||
"start": "node server.js",
|
||||
"eslint": "eslint src/**/*.js public/js/**/*.js",
|
||||
"precommit": "npm run eslint",
|
||||
"postinstall": "node_modules/.bin/bower install"
|
||||
},
|
||||
"engines": {
|
||||
"node": "8.6.x",
|
||||
"npm": "5.3.x"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/martincarrera/clash-royale-api.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"bcrypt-nodejs": "0.0.3",
|
||||
"bluebird": "^3.3.5",
|
||||
"body-parser": "^1.15.0",
|
||||
"bower": "^1.8.0",
|
||||
"dotenv": "^2.0.0",
|
||||
"express": "^4.13.4",
|
||||
"jsonwebtoken": "^7.0.0",
|
||||
"lodash": "^4.6.1",
|
||||
"mongoose": "^4.4.7",
|
||||
"morgan": "^1.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.11.9",
|
||||
"eslint": "^2.9.0",
|
||||
"eslint-config-airbnb": "^9.0.1",
|
||||
"eslint-config-angular": "^0.5.0",
|
||||
"eslint-plugin-angular": "^1.0.1",
|
||||
"eslint-plugin-import": "^1.7.0",
|
||||
"eslint-plugin-jsx-a11y": "^1.2.0",
|
||||
"eslint-plugin-react": "^5.0.1",
|
||||
"husky": "^0.11.5",
|
||||
"istanbul": "^0.4.3",
|
||||
"mocha": "^2.4.5",
|
||||
"mockgoose": "^5.3.2",
|
||||
"should": "^8.3.2",
|
||||
"supertest": "^1.2.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
"extends": "angular"
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
.form-signin {
|
||||
min-height: 100vh;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.layout-container {
|
||||
display: flex;
|
||||
align-items: stretch;;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.layout {
|
||||
min-width: 200px;
|
||||
flex: 1 0 0;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.preview {
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 168 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 220 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 726 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 273 KiB |
|
After Width: | Height: | Size: 230 KiB |
|
After Width: | Height: | Size: 522 KiB |
|
After Width: | Height: | Size: 247 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 231 KiB |
|
After Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 155 KiB |
|
After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 115 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 152 KiB |