edbizarro/clash-royale-api

Clash Royale Api PHP SDK


README

PHP Wrapper for the Official Clash Royale API.

Build Status StyleCI Latest Stable Version License

Installation

You can install the package via composer:

composer require edbizarro/clash-royale-api

Usage

Before use this library visit https://developer.clashroyale.com to get an API TOKEN

Make sure to initialize the API Api::setApiToken($apiToken) with a valid token before making requests

Clan

Info

<?php
use Edbizarro\ClashRoyale\Clan;

$clan = new Clan('clan_tag');
$clan->get();

Search

<?php
use Edbizarro\ClashRoyale\Clan;

$clan = new Clan();
$clan->search(['name' => 'clan name']);

List with all search parameters

Members

<?php
use Edbizarro\ClashRoyale\Clan;

$clan = new Clan('clan_tag');
$clan->members();

List with all members parameters

War Log

<?php
use Edbizarro\ClashRoyale\Clan;

$clan = new Clan('clan_tag');
$clan->warlog();

List with all warlog parameters

Current War

<?php
use Edbizarro\ClashRoyale\Clan;

$clan = new Clan('clan_tag');
$clan->currentWar();

List with all current war parameters

Player

Info

<?php
use Edbizarro\ClashRoyale\Player;

$player = new Player('player_tag');
$player->get();

Battle log

<?php
use Edbizarro\ClashRoyale\Player;

$player = new Player('player_tag');
$player->battles();

Upcoming Chests

<?php
use Edbizarro\ClashRoyale\Player;

$player = new Player('player_tag');
$player->upcomingChests();

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email edbizarro@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.