Finished DCMI portion.

This commit is contained in:
Tony Roy 2021-03-12 17:20:32 -04:00
commit 80dc580e75
40 changed files with 2199 additions and 4 deletions

66
src/Api/Interfaces.php Normal file
View file

@ -0,0 +1,66 @@
<?php
namespace wickedsoft\NetBox\Api;
class Interfaces extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/dcim/interfaces/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/dcim/interfaces/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/dcim/interfaces/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/dcim/interfaces/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/dcim/interfaces/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function trace($id, $params=[])
{
return $this->get("/dcim/interfaces/".$id."/trace/", $params);
}
}