private function getURL($endpoint = null)
    {
        if (is_null($endpoint)) {
            $endpoint = $this->getEndpoint();
        } else {
            $endpoint = '/api/' . $endpoint;
        }

        return $this->config['url'] . $endpoint;
    }