Refactor Package to be Standalone
This commit is contained in:
parent
0a9492699d
commit
025a7edacb
129 changed files with 3386 additions and 3974 deletions
62
src/Api/DCIM/Platforms.php
Normal file
62
src/Api/DCIM/Platforms.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
namespace port389\NetBox\Api\DCIM;
|
||||
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use port389\NetBox\Api\AbstractApi;
|
||||
|
||||
class Platforms extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/platforms/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/platforms/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/platforms/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/platforms/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/platforms/" . $id . "/", $params);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue