diff options
Diffstat (limited to 'matrix-specification/Requests/ClientSyncGetRequest.php')
| -rw-r--r-- | matrix-specification/Requests/ClientSyncGetRequest.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/matrix-specification/Requests/ClientSyncGetRequest.php b/matrix-specification/Requests/ClientSyncGetRequest.php index 2ab7d9e..f19e820 100644 --- a/matrix-specification/Requests/ClientSyncGetRequest.php +++ b/matrix-specification/Requests/ClientSyncGetRequest.php @@ -2,9 +2,11 @@ namespace Matrix\Requests; +use Matrix\Enums\ApiPathVersion; use Matrix\Enums\PresenceState; +use Matrix\Request; -class ClientSyncGetRequest implements RequiresAuthentication +class ClientSyncGetRequest extends Request implements RequiresAuthentication { public function __construct( private ?string $filter = null, @@ -24,6 +26,11 @@ class ClientSyncGetRequest implements RequiresAuthentication $this->useStateAfter ??= false; } + public function getUri(string $scheme, string $serverName, ApiPathVersion $version): string + { + return "{$scheme}://{$serverName}/_matrix/client/{$version}/sync"; + } + public function getQueryParameters(): array { return array_filter([ @@ -33,6 +40,11 @@ class ClientSyncGetRequest implements RequiresAuthentication "since" => $this->since, "timeout" => $this->timeout, "use_state_after" => $this->useStateAfter, - ], "is_null"); + ], fn ($value) => ! is_null($value)); + } + + public function getBody(): array + { + return []; } } |
