netbox-php/src/Api/Users/Groups.php

58 lines
1.2 KiB
PHP
Raw Normal View History

2021-03-12 17:20:32 -04:00
<?php
namespace wickedsoft\NetBox\Api\Users;
2021-03-12 17:20:32 -04:00
use wickedsoft\NetBox\Api\AbstractApi;
class Groups extends AbstractApi
2021-03-12 17:20:32 -04:00
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/users/groups/", $params);
2021-03-12 17:20:32 -04:00
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/users/groups/".$id."/", $params);
2021-03-12 17:20:32 -04:00
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/users/groups/".$id."/", $params);
2021-03-12 17:20:32 -04:00
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/users/groups/", $params);
2021-03-12 17:20:32 -04:00
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/users/groups/".$id."/", $params);
2021-03-12 17:20:32 -04:00
}
}