public function getApiUrl($path = '/', array $query = [])
    {
        $base = new Uri($this->apiUrl);
        $path = new Uri($path);

        foreach ($query as $key => $value) {
            $path = Uri::withQueryValue($path, $key, $value);
        }

        return (string) UriResolver::resolve($base, $path);
    }