Skip to content

Commit

Permalink
Merge pull request #3 from ica4c/feature/europe_server
Browse files Browse the repository at this point in the history
Added new server
  • Loading branch information
ica4c authored Mar 17, 2024
2 parents 3322400 + 450cffa commit e84eef7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public function __construct()

/**
* @description Get primary service status state
*
* @param RealmStatusHost $host
*
* @return \Albion\Status\DTOs\ServiceStateDTO
*/
public function getServiceStatus(RealmStatusHost $host): ServiceStateDTO
Expand All @@ -49,6 +51,7 @@ public function getServiceStatus(RealmStatusHost $host): ServiceStateDTO
* @description Fetches current client version
*
* @return Version|null
*
* @throws \Exception
*/
public function getClientVersion(): ?Version
Expand Down
4 changes: 2 additions & 2 deletions src/Decorators/ResponseStateDTODecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class ResponseStateDTODecorator
protected function isDTTime(): bool
{
$dtStartTime = (new DateTime('now'))->setTime(10, 00, 00, 00);
$dtEndTime = (new DateTime('now'))->setTime(11, 00, 00, 00);
$now = new DateTime();
$dtEndTime = (new DateTime('now'))->setTime(11, 00, 00, 00);
$now = new DateTime();

return $dtStartTime < $now && $now < $dtEndTime;
}
Expand Down
5 changes: 3 additions & 2 deletions src/Enums/RealmStatusHost.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

class RealmStatusHost extends Enum
{
public const WEST = 'https://serverstatus.albiononline.com';
public const EAST = 'https://serverstatus-sgp.albiononline.com';
public const AMERICA = 'https://serverstatus.albiononline.com';
public const ASIA = 'https://serverstatus-sgp.albiononline.com';
public const EUROPE = 'https://serverstatus-ams.albiononline.com';
}
5 changes: 3 additions & 2 deletions tests/StatusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ public function testStatusReport(string $realm): void
public function realmDataProvider(): array
{
return [
[RealmStatusHost::WEST],
[RealmStatusHost::EAST]
[RealmStatusHost::AMERICA],
[RealmStatusHost::ASIA],
[RealmStatusHost::EUROPE],
];
}
}

0 comments on commit e84eef7

Please sign in to comment.