62 lines
1.4 KiB
PHP
62 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace port389\NetBox\Api\Extras;
|
|
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
use port389\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);
|
|
}
|
|
|
|
/**
|
|
* @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 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);
|
|
}
|
|
}
|