CSharp-Clash-Royale-API

Just a simple ClashRoyale API wrapper, written in CSharp.

View on GitHub

Clash Royale

Get all info about clash royale cards, loot, leagues and player levels.

This is a wrapper for the awesome NodeJS Clash Royale api made by Martin Carrera.

Motivation

The need to use this library in any dotnet core application.

Usage

Install using your favorite package manager:

Models:

Arena Card Chest League Player

Available methods:

Requirements

using ClashRoyale;
using ClashRoyale.Models;

Cards:

// Returns all cards
List<Card> cards = Royale.GetCards();

// Returns a single card - Id name or id
Card card = Royale.GetCard("fireball");

// Returns the card image url
string imageUrl = Royale.GetCardImageURL(idName);

Arenas:

// Returns all arenas
List<Arena> arenas = Royale.GetArenas();

// Returns a single arena - id or idname
Arena arena = Royale.GetArena(id);

// Returns the arena image url
string arena url = Royale.GetArenaImageURL(idName);

Chests:

// Returns all chests
List<Chest> chests = Royale.GetChests();

// Returns a single chest
Chest chest = Royale.GetChest(id);

// Returns the chest image url
string chestImageUrl = Royale.GetChestURL(idName);

Leagues:

// Returns all leagues
List<League> leagues = Royale.GetLeagues();

// Returns a single league
League league = Royale.GetLeague(id);

// Returns the league image
string leagueImageUrl = Royale.GetLeagueImageURL(idName);

Player info:

// Returns all info about players
List<Players> players = Royale.GetPlayers();

// Returns info about a single player level
Player player = Royale.GetPlayer(id);

And more examples:

// Getting all the cards
List<Card> cards = Royale.GetCards();
foreach (Card card in cards)
{
    Console.WriteLine(card.Name);
}

;

Random deck:

List<Card> randomDeck = Royale.GetRandomDeck();

TODO

License

MIT - André Varandas

Important Notice

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: www.supercell.com/fan-content-policy.