private function buildUrl($path) {
        $key = $this->patrol->getApiKey();
        $secret = $this->patrol->getApiSecret();

        $base = $this->patrol->apiBase;

        $url = $base . '/' . $path . '?key=' . $key . '&secret=' . $secret;

        if ($this->method === "get" && !is_null($this->payload)) {
            $query = http_build_query($this->payload);
            $url .= '&' . $query;
        }

        if (count($this->scopes)) {
            $scopes = implode(',', $this->scopes);
            if ($scopes) {
                $url .= '&scope=' . $scopes;
            }
        }

        $this->url = $url;
    }
private function buildUrl($path) {
        $key = $this->patrol->getApiKey();
        $secret = $this->patrol->getApiSecret();

        $base = $this->patrol->apiBase;

        $url = $base . '/' . $path . '?key=' . $key . '&secret=' . $secret;

        if ($this->method === "get" && !is_null($this->payload)) {
            $query = http_build_query($this->payload);
            $url .= '&' . $query;
        }

        if (count($this->scopes)) {
            $scopes = implode(',', $this->scopes);
            if ($scopes) {
                $url .= '&scope=' . $scopes;
            }
        }

        $this->url = $url;
    }
private function buildUrl ( $ path ) { $ key = $ this -> patrol -> getApiKey ( ) ; $ secret = $ this -> patrol -> getApiSecret ( ) ; $ base = $ this -> patrol -> apiBase ; $ url = $ base . '/' . $ path . '?key=' . $ key . '&secret=' . $ secret ; if ( $ this -> method === "get" && ! is_null ( $ this -> payload ) ) { $ query = http_build_query ( $ this -> payload ) ; $ url .= '&' . $ query ; } if ( count ( $ this -> scopes ) ) { $ scopes = implode ( ',' , $ this -> scopes ) ; if ( $ scopes ) { $ url .= '&scope=' . $ scopes ; } } $ this -> url = $ url ; }
Takes a path and builds the URL with the given key and secret

@param string $path
Takes a path and builds the URL with the given key and secret