add kevaPut method

This commit is contained in:
ghost 2023-12-06 01:43:33 +02:00
parent 2ff2b02fcf
commit a961e5e907

View File

@ -315,4 +315,36 @@ class Client
return null; return null;
} }
public function kevaPut(
string $namespace,
string $key,
string $value
): ?string
{
$this->_id++;
$this->_prepare(
'',
'POST',
[
'method' => 'keva_put',
'params' => [
$namespace,
$key,
$value
],
'id' => $this->_id
]
);
$response = $this->_execute();
if (!empty($response['txid']) && is_string($response['txid']))
{
return $response['txid'];
}
return null;
}
} }