edbizarro/clash-royale-api

Clash Royale Api PHP SDK


README

68747470733a2f2f646576656c6f7065722e636c617368726f79616c652e636f6d2f6c5f726574696e612e3532366263342e706e67

PHP Wrapper for the Official Clash Royale API.

Build Status StyleCI 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64396638373638316132636435653439366336332f6d61696e7461696e6162696c697479 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.

68747470733a2f2f692e696d6775722e636f6d2f626e35684f65502e706e67