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