final protected function generateUrl($domain_key, $path = '/')
    {
        $base_domain = self::$URL_MAP[$domain_key];
        $base_domain = str_replace('{domain}', $this->domain, $base_domain);

        if ($path[0] === '/') {
            $path = substr($path, 1);
        }

        return $base_domain.$path;
    }
final protected function generateUrl($domain_key, $path = '/')
    {
        $base_domain = self::$URL_MAP[$domain_key];
        $base_domain = str_replace('{domain}', $this->domain, $base_domain);

        if ($path[0] === '/') {
            $path = substr($path, 1);
        }

        return $base_domain.$path;
    }
final protected function generateUrl ( $ domain_key , $ path = '/' ) { $ base_domain = self :: $ URL_MAP [ $ domain_key ] ; $ base_domain = str_replace ( '{domain}' , $ this -> domain , $ base_domain ) ; if ( $ path [ 0 ] === '/' ) { $ path = substr ( $ path , 1 ) ; } return $ base_domain . $ path ; }
Constructs an API URL.

@param string $domain_key
@param string $path

@return string
Constructs an API URL .