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

56
src/Api/Sites.php Normal file
View file

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