netbox-php/src/Api/Extras/Scripts.php

30 lines
624 B
PHP
Raw Normal View History

<?php
2022-05-31 12:56:36 +02:00
namespace port389\NetBox\Api\Extras;
2022-05-31 12:56:36 +02:00
use GuzzleHttp\Exception\GuzzleException;
use port389\NetBox\Api\AbstractApi;
class Scripts extends AbstractApi
{
/**
2022-05-31 12:56:36 +02:00
* @param array $params
* @return mixed
2022-05-31 12:56:36 +02:00
* @throws GuzzleException
*/
2022-05-31 12:56:36 +02:00
public function list(array $params = [])
{
return $this->get("/extras/scripts/", $params);
}
/**
2022-05-31 12:56:36 +02:00
* @param int $id
* @param array $params
* @return mixed
2022-05-31 12:56:36 +02:00
* @throws GuzzleException
*/
2022-05-31 12:56:36 +02:00
public function show(int $id, array $params = [])
{
2022-05-31 12:56:36 +02:00
return $this->get("/extras/scripts/" . $id . "/", $params);
}
}