-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVersion.php
More file actions
34 lines (28 loc) · 766 Bytes
/
Version.php
File metadata and controls
34 lines (28 loc) · 766 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 version API endpoint
*
* @see https://gotify.net/api-docs#/version API docs for the version endpoint
*/
class Version extends AbstractEndpoint
{
/** @var string $endpoint API endpoint */
private string $endpoint = 'version';
/**
* Get version information
*
* @return stdClass
*
* @see https://gotify.net/api-docs#/version/getVersion API docs for getting version information
*/
public function get(): stdClass
{
$response = $this->guzzle->get($this->endpoint);
$version = Json::decode($response->getBody()->getContents());
return (object) $version;
}
}