Skip to content

Latest commit

 

History

History
220 lines (169 loc) · 5.15 KB

guilds.md

File metadata and controls

220 lines (169 loc) · 5.15 KB

Guilds

Albion\OnlineDataProject\Infrastructure\GameInfo\GuildClient::class

Find guild

Method

searchGuild(string $query)

Params
  • Realm $realm - one of Realm.
  • string $query - search query,
Throws
  • FailedToPerformRequestException - in case if something went wrong
  • GuildNotFoundException - in case if guild not found
Example
$client = new GuildClient();

$client->searchGuild(Realm::AMERICA, 'my-guild-name')
    ->then(
        static function($guilds) {
            // Do something with guilds information
        }
    )

Get basic guild information by id

Method

getGuildInfo()

Params
  • Realm $realm - one of Realm.
  • string $guildId - guild id
Throws
  • FailedToPerformRequestException - in case if something went wrong
  • GuildNotFoundException - in case if guild not found
Example
$client = new GuildClient();

$client->getGuildInfo(Realm::AMERICA, 'guild-uuid')
    ->then(
        static function($guild) {
            // Do something with guild information
        }
    )

Get detailed guild information by id

Method

getGuildData()

Params
  • Realm $realm - one of Realm.
  • string $guildId - guild id
Throws
  • FailedToPerformRequestException - in case if something went wrong
  • GuildNotFoundException - in case if guild not found
Example
$client = new GuildClient();

$client->getGuildData(Realm::AMERICA, 'guild-uuid')
    ->then(
        static function($guild) {
            // Do something with guild information
        }
    )

Get guild players top

Method

getGuildTopMembers()

Params
  • Realm $realm - one of Realm.
  • string $guildId - guild id
  • Range $range - one of the Range values [default=Range::DAY].
  • int $limit - limit response amount [default = 10],
  • int $offset - skip first n values [default = 0],
  • RegionType $regionType - region type [default = RegionType::TOTAl],
Throws
  • FailedToPerformRequestException - in case if something went wrong
  • GuildNotFoundException - in case if guild not found
Example
$client = new GuildClient();

$client->getGuildTopMembers(Realm::AMERICA, 'guild-uuid', Range::of(Range::DAY), 10, 0, RegionType::of(RegionType::HELLGATES))
    ->then(
        static function($players) {
            // Do something with player information
        }
    )

Get all guild members

Method

getGuildMembers(string $guildId)

Params
  • Realm $realm - one of Realm.
  • string $guildId - guild id
Throws
  • FailedToPerformRequestException - in case if something went wrong
  • GuildNotFoundException - in case if guild not found
Example
$client = new GuildClient();

$client->getGuildMembers(Realm::AMERICA, 'guild-uuid')
    ->then(
        static function($players) {
            // Do something with player information
        }
    )

Get guilds top by attacks

Method

getGuildTopByAttacks()

Params
  • Realm $realm - one of Realm.
  • Range $range - one of the Range values [default=Range::DAY].
  • int $limit - limit response amount [default = 10],
  • int $offset - skip first n values [default = 0],
Throws
  • FailedToPerformRequestException - in case if something went wrong
Example
$client = new GuildClient();

$client->getGuildTopByAttacks(Realm::AMERICA, Range::WEEK, 15, 0)
    ->then(
        static function($guilds) {
            // Do something with guilds information
        }
    )

Get guilds top by defence

Method

getGuildTopByDefences()

Params
  • Realm $realm - one of Realm.
  • Range $range - one of the Range values [default=Range::DAY].
  • int $limit - limit response amount [default = 10],
  • int $offset - skip first n values [default = 0],
Throws
  • FailedToPerformRequestException - in case if something went wrong
Example
$client = new GuildClient();

$client->getGuildTopByDefences(Realm::AMERICA, Range::of(Range::WEEK), 15, 0)
    ->then(
        static function($guilds) {
            // Do something with guilds information
        }
    )

Get guilds top events

Method

getGuildTopEvents()

Params
  • Realm $realm - one of Realm.
  • string $guildId - guild identifier
  • Range $range - one of the Range values [default=Range::DAY].
  • int $limit - limit response amount [default = 10],
  • int $offset - skip first n values [default = 0],
Throws
  • FailedToPerformRequestException - in case if something went wrong
Example
$client = new GuildClient();

$client->getGuildTopEvents(Realm::AMERICA, 'identifier', Range::of(Range::WEEK), 15, 0)
    ->then(
        static function($guilds) {
            // Do something with guilds information
        }
    )