Skip to content

mobaguides/arena-of-valor-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arena of Valor API

This is an in-official PHP API wrapper for the mobile game "Arena of Valor". Currently it supports fetching Heroes, Hero Details and Images.

Requirements

This package requires >= PHP 7.2. Version below PHP 7.2 will never be supported.

Installation

composer require mobaguides/arena-of-valor-api

Usage

Factory

Use the Factory to create ApiFetcher objects.

use MobaGuides\ArenaOfValorApi\Fetchers\Hero;
use MobaGuides\ArenaOfValorApi\Fetchers\Image;

ArenaOfValorApi::make(Hero::class);

Fetchers

Fetchers are Classes that extend MobaGuides\ArenaOfValorApi\Fetchers\ApiFetcher. You can also create your own Fetchers and instantiate them through the factory. Just let them inherit from this class.

Fetch All Heroes

use MobaGuides\ArenaOfValorApi\ArenaOfValor;
use MobaGuides\ArenaOfValorApi\Fetchers\Hero;

$hero = ArenaOfValor::make(Hero::class);
var_dump($hero->all());

Fetch Hero Details

use MobaGuides\ArenaOfValorApi\ArenaOfValor;
use MobaGuides\ArenaOfValorApi\Fetchers\Hero;

$hero = ArenaOfValor::make(Hero::class);
var_dump($hero->detail(106));

Get Skill Image

use MobaGuides\ArenaOfValorApi\ArenaOfValor;
use MobaGuides\ArenaOfValorApi\Fetchers\Image;

$image = ArenaOfValor::make(Image::class);
var_dump($image->skillIcon(10610)); // Krixi's Flutter skill icon

Get Hero Profile Image

use MobaGuides\ArenaOfValorApi\ArenaOfValor;
use MobaGuides\ArenaOfValorApi\Fetchers\Image;

$image = ArenaOfValor::make(Image::class);
var_dump($image->heroAvatar(106)); // Hero Avatar of Krixi

About

An API wrapper to fetch data for the mobile game "Arena of Valor"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages