netbox-php/src/Api/Ip.php
Tony Roy 2fbd9ab040
Update Ip.php
push changes that didnt come through from test env
2021-03-11 23:00:11 -04:00

56 lines
1.2 KiB
PHP

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