PHP code example of mobaguides / mobile-legends-api

1. Go to this page and download the library: Download mobaguides/mobile-legends-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mobaguides / mobile-legends-api example snippets


use MobaGuides\MobileLegendsApi\Fetchers\Hero;
use MobaGuides\MobileLegendsApi\Fetchers\Image;

MobileLegends::make(Hero::class);

use MobaGuides\MobileLegendsApi\MobileLegends;
use MobaGuides\MobileLegendsApi\Fetchers\Hero;

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

use MobaGuides\MobileLegendsApi\MobileLegends;
use MobaGuides\MobileLegendsApi\Fetchers\Hero;

$hero = MobileLegends::make(Hero::class);
var_dump($hero->detail(1));

use MobaGuides\MobileLegendsApi\MobileLegends;
use MobaGuides\MobileLegendsApi\Fetchers\Image;

$image = MobileLegends::make(Image::class);
var_dump($image->find('HeroHead001.png'));

use MobaGuides\MobileLegendsApi\MobileLegends;
use MobaGuides\MobileLegendsApi\Fetchers\Image;

$image = MobileLegends::make(Image::class);
var_dump($image->heroAvatar(1)); // Hero Avatar of Miya