Giter VIP home page Giter VIP logo

clash-royale-api's Introduction

Codeship Status for martincarrera/clash-royale-api Coverage Status donate paypal

A Clash Royale 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.

Content

  1. How to use
    1. Endpoints
    2. Images
  2. Want to help
  3. Development
    1. Install
    2. Run
    3. Test
  4. Apps that use this API

How to use

Consume the API to get all the information you need from these routes.

Endpoints

Base route.

Route HTTP Verb Description
/api/arenas GET All Arenas information
/api/arenas/:id GET Single Arena information
/api/arenas/:idName GET Single Arena information
/api/cards GET All Cards information
/api/cards/:id GET Single Card information
/api/cards/:idName GET Single Card information
/api/chests GET All Chests information
/api/chests/:id GET Single Chest information
/api/chests/:idName GET Single Chest information
/api/leagues GET All Leagues information
/api/leagues/:id GET Single League information
/api/leagues/:idName GET Single League information
/api/players GET All Players levels information
/api/players/:id GET Player level information
/api/players/:idName GET Player level information
/api/random-deck GET Get a Random deck!

Images

You can get the images too! Thank you MaherFa!

Route Description
/images/arenas/${idName}.png Arenas images
/images/cards/${idName}.png Cards images
/images/chests/${idName}.png Chests images
/images/leagues/${idName}.png Leagues images

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 ❤️ the API, help me pay the hosting!

Development

Make sure you have installed all these prerequisites on your development machine.

Install

> git clone https://github.com/martincarrera/clash-royale-api.git
> cd clash-royale-api
> npm install

Run

> mongod
> cd clash-royale-api
> npm run dev

If you don't have Nodemon installed

> mongod
> cd clash-royale-api
> npm i -g nodemon
> npm run dev

Test

> npm test

Apps that use this API

APP DESCRIPTION LINK
Randeck Simple web app that generates random decks. Go!
Royale Plus Facebook for Clash Royale players. Git! Go!
BarrePolice A Telegram Bot based on plugins written in Lua Go! & send /cr
Clashapi NPM package to consume this API Go!
Deck it Deck builder app designed for Android Go!
Deck Generator for Echo Devices Alexa skill to suggest a deck for clash royale for Amazon's Echo devices Go!
Clash Royale Discord Bot A Discord bot that displays informations depending of commands Go!
Deck Royale A SPA using Vue that generates random decks. Git! Go!
ClashElite Simple app that gives info on chest cycles and generates random decks with copy and share feature. Go!

Made with ❤️ 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.

clash-royale-api's People

Contributors

amirsavand avatar barreeeiroo avatar deepanshsachdeva avatar gillchristian avatar hzooly avatar ikenami avatar maherfa avatar martincarrera avatar redman1037 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clash-royale-api's Issues

Help

hi,
could you post some tutorial about to use this Api since the beginning? I'm having some trouble to use this api.
tks a lot!

Arenas and Leagues

I'm about to submit a pull request for the new arena images but I need to know a couple of things.

  1. shouldn't we avoid using the single quote ' character in the idName of pekka's-playhouse and builder's-workshop
  2. are you planing to add the new "Leagues" to the arenas or do you want to create a new route for them?

Available Arenas

barbarian-bowl
bone-pit
builder's-workshop
frozen-peak
goblin-stadium
hog-mountain
jungle-arena
legendary-arena
pekka's-playhouse
royal-arena
spell-valley
training-camp

Available Leagues

blank
challenger-ii
challenger-iii
champion
chellenger-i
grand-champion
master-i
master-ii
master-iii
ultimate-champion

Update API

Update API to include the changes made with the March update.

cards details information need.

just found this good api but now it is only contain super basic information.
if card details information is provided then i will be start developing a webapp with this api.
for example pass in card id to get detail information of the card in a list by card level

Add Card Image

I makes sense to have the character card images here as well

Question

hi.
I have a question

  1. Can you use it in Unity?
    If you can use it, please guide me

  2. Do you have a win / lose API?

Thanks

How do you get this to work?

I've got your files in a directory on my computer. I've installed node.js. I imported the dependencies with npm install. When I try to start it up with npm start I get this error:

\server.js:242
       process.nextTick(function() { throw err; })
                                     ^
Error: connect ECONNREFUSED 127.0.0.1:27017
   at Object.exports._errnoException (util.js:870:11)
   at exports._exceptionWithHostPort (util.js:893:20)
   at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)

I'm a very very new to node.js and Mongo. I only started really looking at them because of this. Help please! 👍

Translations

Great job @martincarrera! I would suggest adding support for i18n translations on your API. Maybe passing an argument on the header or query params to set the language that the client wants to receive.

Optimize arena images

Some images have a lot of space around them, which is bad and makes images size a bit larger.
In other words, having spaces around images is bad practice.

I will make a pull request for this one myself! (if that's ok)

Can clash api get player match/top players info ?

Hi,

This is a great api to be used for clash royale. Thank you for your efforts, I am thinking using some match data inside clash royale to doing some interesting projects. I am wondering is this api able to acquire top players gameTag as well as their recent match records and decks they are using?

Thanks

Level Image

Will be possible to add the level image to the API? I mean, to add the blue star with the level

API Site seems down

I just tried browsing http://www.clashapi.xyz/
and I'm getting Application Error: An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.

My app heavily relies upon the site, so I'd love the website back up as soon as possible.

Cant run the server

Hi,

I'm following the steps of the readme but when I get to the part where I'm going to run the server I end up getting these errors:

bash: mongod: command not found

and

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! clash-royale-api@ dev: nodemon server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the clash-royale-api@ dev script 'nodemon server.js'.
npm ERR! This is most likely a problem with the clash-royale-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! nodemon server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs clash-royale-api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls clash-royale-api
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! \clash-royale-api\npm-debug.log

Any idea that I'm doing wrong or what happens that I can not run the server.

Errors...

Running mongod i get the following error:

2017-02-16T20:40:27.060+0100 I CONTROL  [initandlisten] MongoDB starting : pid=6292 port=27017 dbpath=D:\data\db\ 64-bit host=S3BAX-PC
2017-02-16T20:40:27.061+0100 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2017-02-16T20:40:27.062+0100 I CONTROL  [initandlisten] db version v3.4.2
2017-02-16T20:40:27.062+0100 I CONTROL  [initandlisten] git version: 3f76e40c105fc223b3e5aac3e20dcd026b83b38b
2017-02-16T20:40:27.063+0100 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips  22 Sep 2016
2017-02-16T20:40:27.063+0100 I CONTROL  [initandlisten] allocator: tcmalloc
2017-02-16T20:40:27.063+0100 I CONTROL  [initandlisten] modules: none
2017-02-16T20:40:27.064+0100 I CONTROL  [initandlisten] build environment:
2017-02-16T20:40:27.064+0100 I CONTROL  [initandlisten]     distmod: 2008plus-ssl
2017-02-16T20:40:27.065+0100 I CONTROL  [initandlisten]     distarch: x86_64
2017-02-16T20:40:27.065+0100 I CONTROL  [initandlisten]     target_arch: x86_64
2017-02-16T20:40:27.065+0100 I CONTROL  [initandlisten] options: {}
2017-02-16T20:40:27.066+0100 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory D:\data\db\ not found., terminating
2017-02-16T20:40:27.066+0100 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2017-02-16T20:40:27.067+0100 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
2017-02-16T20:40:27.067+0100 I CONTROL  [initandlisten] now exiting
2017-02-16T20:40:27.067+0100 I CONTROL  [initandlisten] shutting down with code:100

And running npm run dev or npm start I get the following error:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle clash-royale-api@~prestart: clash-royale-api@
6 silly lifecycle clash-royale-api@~prestart: no script for prestart, continuing
7 info lifecycle clash-royale-api@~start: clash-royale-api@
8 verbose lifecycle clash-royale-api@~start: unsafe-perm in lifecycle true
9 verbose lifecycle clash-royale-api@~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\Dev\Git\clash-royale-api\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\php;C:\Program Files\nodejs\;C:\Program Files\MongoDB\Server\3.4\bin;C:\Users\S3BAX\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\S3BAX\AppData\Local\Programs\Python\Python36-32\;C:\Users\S3BAX\AppData\Local\Microsoft\WindowsApps;C:\Users\S3BAX\AppData\Roaming\npm
10 verbose lifecycle clash-royale-api@~start: CWD: D:\Dev\Git\clash-royale-api
11 silly lifecycle clash-royale-api@~start: Args: [ '/d /s /c', 'node server.js' ]
12 silly lifecycle clash-royale-api@~start: Returned: code: 1  signal: null
13 info lifecycle clash-royale-api@~start: Failed to exec start script
14 verbose stack Error: clash-royale-api@ start: `node server.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid clash-royale-api@
16 verbose cwd D:\Dev\Git\clash-royale-api
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v6.9.5
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error clash-royale-api@ start: `node server.js`
22 error Exit status 1
23 error Failed at the clash-royale-api@ start script 'node server.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the clash-royale-api package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     node server.js
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs clash-royale-api
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls clash-royale-api
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Minions Card Issue

The minions card doesn't have an order:
image
I'm creating a bot for Telegram using your amazing API (congrats for making so cool), but as you can see there is no order in the JSON response:
{"_id":"58976166fa5bce0010123fb2","idName":"minions","rarity":"Common","type":"Troop","name":"Minions","description":"Three fast, unarmored flying attackers. Roses are red, minions are blue, they can fly, and will crush you!","arena":2,"elixirCost":3,"__v":0}

Could you fix it?
Thanks

extra dot charachter in "Balloon" card name

{
    "_id": "58d176a56d804500104b125c",
    "idName": "balloon",
    "rarity": "Epic",
    "type": "Troop",
    "name": "Balloon.",
    "description": "As pretty as they are, you won't want a parade of THESE balloons showing up on the horizon. Drops powerful bombs and when shot down, crashes dealing area damage.",
    "arena": 2,
    "elixirCost": 5,
    "order": 24,
    "__v": 0
}

name should be "Balloon"

how to use?

please give me more information on how to use this tool .

what language is that? javascript?

I have a website clash royale and would like to use

Release on npm

Thanks for the great project! 👍 Can you please release it on npm? This would make the installation a lot easier. Thanks in advance!

Update API

The API should have all the new chests and cards available in the September 19th update.

Add chest cycle information

Create a new endpoint and add the current chest cycle information, and if possible all the information about the chests that are outside the cycle.

Clans

How can I get information about a specified clan or player?

Add challenge chest data

Great API. Can you add challenge chest data, e.g. epic / legendary / rare chances for Classic Challenges and Grand Challenges chests together with the gold range, card count, etc?

Thanks!

Adding stat icons

I now have high quality versions of all stat icons and other UI elements of the game, including level star (#59) and other useful graphics.

I will be uploading them and adding a pull request but we need to agree on where to upload them.we can create a folder called icons or misc and upload them all in there or create a dir called stats for stat icons alone. and other icons to another directory.

opinions?

Check out this new clash royale api...

Stats-Royale-Python This api scrapes StatsRoyale to get player details, upcoming chests in chest cycle, last few battles from player tag clan members and clan details from clan tag.

The only main problem is that the scraper breaks down when the HTML of the website is changed.
It would be great to have a few helping hands.

Improve chest images

Chests images should be pixel perfect, consistent, with better resolution, and include new chests.

Add complete information for each card and level

[{
"Name": "Archers",
"idName": "archers",
"Rarity": "Common",
"type": "Troop",
"Cost": "3",
"Range": "5",
"DeployTime": "1",
"HitSpeed": "1.2",
"arena": 0,
"elixirCost": 3,
"description": "A pair of unarmored ranged attackers. They'll help you with ground and air unit attacks, but you're on your own with coloring your hair.",
"statistics":   [
    {"Levels": "1", "Hitpoints":"125", "Damage": "40", "DPS": "33"},
    {"Levels": "2", "Hitpoints":"137", "Damage": "44", "DPS": "36"},
    {"Levels": "3", "Hitpoints":"151", "Damage": "48", "DPS": "40"},
    {"Levels": "4", "Hitpoints":"166", "Damage": "53", "DPS": "44"},
    {"Levels": "5", "Hitpoints":"182", "Damage": "58", "DPS": "48"},
    {"Levels": "6", "Hitpoints":"200", "Damage": "64", "DPS": "53"},
    {"Levels": "7", "Hitpoints":"220", "Damage": "70", "DPS": "56"},
    {"Levels": "8", "Hitpoints":"241", "Damage": "77", "DPS": "64"},
    {"Levels": "9", "Hitpoints":"265", "Damage": "84", "DPS": "70"},
    {"Levels": "10", "Hitpoints":"291", "Damage": "93", "DPS": "77"},
    {"Levels": "11", "Hitpoints":"320", "Damage": "102", "DPS": "85"},
    {"Levels": "12", "Hitpoints":"351", "Damage": "112", "DPS": "93"},
    {"Levels": "13", "Hitpoints":"386", "Damage": "123", "DPS": "102"}
]
}

]

Add new cards

Hi,
I checked you have an already built utility to easily add cards to the server.
Will you add the latest CR cards?
Cannon Cart - Epic, 5 elixir, Troop, Arena Hog Mountain, Ground unit
Flying Machine - Rare, 4 elixir, Troop, Jungle Arena, Air unit
Mega Knight - Legendary, 7 elixir, troop, hog mountain, ground unit

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.