Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 883 Bytes

battles.md

File metadata and controls

37 lines (29 loc) · 883 Bytes

Battles

Albion\OnlineDataProject\Infrastructure\GameInfo\BattleClient::class

Get battle list

Method

getBattles()

Params
  • Realm $realm - one of Realm.
  • Range $range - one of the Range values.
  • int $limit - limit response results [default = 10],
  • int $offset - skip n first values [default = 0],
  • BattleSortType $sort - sort battles by BattleSortType [default = BattleSortType::RECENT]
  • string $guildId - look for this guild only
Example

Get the current day most famous battles

$client = new BattleClient();

$client->getBattles(
    Realm::AMERICA,
    Range::DAY,
    1,
    0,
    BattleSortType::TOTAL_FAME
)
    ->then(
        static function($battles) {
            // Do something with battles information
        }
    )