mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-13 21:56:14 +00:00
refactored code
Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
This commit is contained in:
26
src/Id/Resources/SshKey.php
Normal file
26
src/Id/Resources/SshKey.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Anikeen\Id\Resources;
|
||||
|
||||
use Anikeen\Id\Concerns\HasParent;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
/**
|
||||
* @property string $id
|
||||
*/
|
||||
class SshKey extends BaseResource
|
||||
{
|
||||
use HasParent;
|
||||
|
||||
/**
|
||||
* Deletes a given ssh key for the currently authed user.
|
||||
*
|
||||
* @throws RequestRequiresClientIdException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function delete(): bool
|
||||
{
|
||||
return $this->parent->delete(sprintf('v1/ssh-keys/%s', $this->id))->success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user