Clean & reformat code
This commit is contained in:
parent
9e323171fd
commit
5180bf1d38
88 changed files with 4317 additions and 4408 deletions
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ConfigContexts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/extras/config-contexts/", $params);
|
||||
}
|
||||
class ConfigContexts extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/extras/config-contexts/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/extras/config-contexts/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/extras/config-contexts/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/extras/config-contexts/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/extras/config-contexts/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/config-contexts/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update( int $id, array $params = [] ): array {
|
||||
return $this->patch( "/extras/config-contexts/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/config-contexts/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/config-contexts/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/config-contexts/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/config-contexts/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,26 +5,25 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ContentTypes extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/content-types/", $params);
|
||||
}
|
||||
class ContentTypes extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/content-types/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/content-types/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/content-types/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class CustomFields extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/extras/custom-fields/", $params);
|
||||
}
|
||||
class CustomFields extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/extras/custom-fields/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/extras/custom-fields/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/extras/custom-fields/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/extras/custom-fields/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/extras/custom-fields/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/custom-fields/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update( int $id, array $params = [] ): array {
|
||||
return $this->patch( "/extras/custom-fields/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/custom-fields/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/custom-fields/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/custom-fields/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/custom-fields/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ExportTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/extras/export-templates/", $params);
|
||||
}
|
||||
class ExportTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/extras/export-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/extras/export-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/extras/export-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/extras/export-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/extras/export-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/export-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update( int $id, array $params = [] ): array {
|
||||
return $this->patch( "/extras/export-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/export-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/export-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/export-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/export-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ImageAttachments extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/extras/image-attachments/", $params);
|
||||
}
|
||||
class ImageAttachments extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/extras/image-attachments/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/extras/image-attachments/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/extras/image-attachments/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/extras/image-attachments/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/extras/image-attachments/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/image-attachments/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update( int $id, array $params = [] ): array {
|
||||
return $this->patch( "/extras/image-attachments/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/image-attachments/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/image-attachments/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/image-attachments/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/image-attachments/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,26 +5,25 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class JobResults extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/job-results/", $params);
|
||||
}
|
||||
class JobResults extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/job-results/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/job-results/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/job-results/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,26 +5,25 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ObjectChanges extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/object-changes/", $params);
|
||||
}
|
||||
class ObjectChanges extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/object-changes/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/object-changes/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/object-changes/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,37 +5,36 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Reports extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/reports/", $params);
|
||||
}
|
||||
class Reports extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/reports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/reports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/reports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function run(int $id, array $params = []): array
|
||||
{
|
||||
return $this->post("/extras/reports/" . $id . "/run/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function run( int $id, array $params = [] ): array {
|
||||
return $this->post( "/extras/reports/" . $id . "/run/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,26 +5,25 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Scripts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/scripts/", $params);
|
||||
}
|
||||
class Scripts extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/scripts/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/scripts/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/scripts/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\Extras;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Tags extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/extras/tags/", $params);
|
||||
}
|
||||
class Tags extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/extras/tags/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/extras/tags/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/extras/tags/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/extras/tags/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/extras/tags/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/tags/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update( int $id, array $params = [] ): array {
|
||||
return $this->patch( "/extras/tags/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/extras/tags/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/extras/tags/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/extras/tags/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/extras/tags/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue