-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHealth.php
More file actions
34 lines (28 loc) · 756 Bytes
/
Health.php
File metadata and controls
34 lines (28 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
declare(strict_types=1);
namespace Gotify\Endpoint;
use Gotify\Json;
use stdClass;
/**
* Class for interacting with the health API endpoint
*
* @see https://gotify.net/api-docs#/health API docs for the health endpoint
*/
class Health extends AbstractEndpoint
{
/** @var string $endpoint API endpoint */
private string $endpoint = 'health';
/**
* Get health information
*
* @return stdClass
*
* @see https://gotify.net/api-docs#/client/getClients API docs for getting health information
*/
public function get(): stdClass
{
$response = $this->guzzle->get($this->endpoint);
$health = Json::decode($response->getBody()->getContents());
return (object) $health;
}
}