From adaa60ad0737b84d004f365aa9df1180d4c07fa9 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 5 Dec 2023 03:01:48 +0200 Subject: [PATCH] add kevaFilter method --- src/Client.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/Client.php b/src/Client.php index d9b14cb..1969169 100644 --- a/src/Client.php +++ b/src/Client.php @@ -239,4 +239,35 @@ class Client return null; } + + public function kevaFilter( + string $namespace, + ?string $value = null + ): mixed + { + $this->_id++; + + $this->_prepare( + '', + 'POST', + [ + 'method' => 'keva_filter', + 'params' => + [ + $namespace, + $value + ], + 'id' => $this->_id + ] + ); + + $response = $this->_execute(); + + if (!empty($response['result'])) + { + return $response['result']; + } + + return null; + } }