File: D:/HostingSpaces/SBogers10/farmfun.komma.pro/app/Komma/Teamleader/Endpoints/UserEndpoint.php
<?php
namespace App\Komma\Teamleader\Endpoints;
use App\Komma\Teamleader\Base\ApiException;
use App\Komma\Teamleader\Base\ApiResponse;
use App\Komma\Teamleader\Base\Endpoint;
use App\Komma\Teamleader\Resources\User;
use App\Komma\Teamleader\TeamleaderApi;
use GuzzleHttp\Psr7\Request;
final class UserEndpoint extends Endpoint
{
protected string $resourceClass = User::class;
/**
* Get a list of the recipes
*
* @param array $params
* @return ApiResponse
* @throws ApiException
*/
public function list(array $params = []): ApiResponse
{
$apiResponse = new ApiResponse($this->resourceClass, 'list');
$apiResponse->setApiPath('users.list');
return $apiResponse->fill(
$this->apiClient->send(
new Request(
TeamleaderApi::HTTP_GET,
$apiResponse->getApiPath(),
$this->buildHttpHeaders(),
json_encode($params)
)
)
);
}
}