Refactor Package to be Standalone

This commit is contained in:
Christian Bönning 2022-05-31 12:56:36 +02:00
commit 025a7edacb
129 changed files with 3386 additions and 3974 deletions

View file

@ -0,0 +1,73 @@
<?php
namespace port389\NetBox\Api\DCIM;
use GuzzleHttp\Exception\GuzzleException;
use port389\NetBox\Api\AbstractApi;
class RearPorts extends AbstractApi
{
/**
* @param array $params
* @return array
* @throws GuzzleException
*/
public function add(array $params = []): array
{
return $this->post("/dcim/rear-ports/", $params);
}
/**
* @param int $id
* @param array $params
* @return bool
* @throws GuzzleException
*/
public function remove(int $id, array $params = []): bool
{
return $this->delete("/dcim/rear-ports/" . $id . "/", $params);
}
/**
* @param int $id
* @param array $params
* @return array
* @throws GuzzleException
*/
public function edit(int $id, array $params = []): array
{
return $this->put("/dcim/rear-ports/" . $id . "/", $params);
}
/**
* @param array $params
* @return mixed
* @throws GuzzleException
*/
public function list(array $params = [])
{
return $this->get("/dcim/rear-ports/", $params);
}
/**
* @param int $id
* @param array $params
* @return mixed
* @throws GuzzleException
*/
public function show(int $id, array $params = [])
{
return $this->get("/dcim/rear-ports/" . $id . "/", $params);
}
/**
* @param int $id
* @param array $params
* @return mixed
* @throws GuzzleException
*/
public function paths(int $id, array $params = [])
{
return $this->get("/dcim/rear-ports/" . $id . "/paths/", $params);
}
}