Server
Tentang Validator Bawaan
/**
* @var Initiation
*/
private Initiation $initiation;
/**
* @param String $base_uri Base Uri (e.g http://localhost:8080/)
* @param String|NULL $api_key API Key
*
* @throws OpenWAException
*/
public function __construct(string $base_uri, String $api_key = NULL)
{
$this->initiation = new Initiation($base_uri, $api_key);
$server = $this->Server();
if (!$server->isAccessible()){
throw new OpenWAException("The server is inaccessible, make sure you put a right host!");
}
elseif (!$server->callFromFactory()->isApiKeyValid()){
throw new OpenWAException("Invalid API Key");
}
elseif (!$server->isPhoneConnected()){
throw new OpenWAException("Phone is disconnected!, make sure your phone is connected from internet");
}
}Aksesibilitas Server
Apakah Sever Butuh Autentikasi?
Apakah API Key Saya Valid?
Apakah Mobile Phone Terkoneksi Dengan Internet?
Last updated