public function api($apiName = null)
    {
        /** @var Repository $repo */
        $repo = $this->container->make(Repository::class);

        return $repo->createApi($apiName ?: $this->defaultApi());
    }
public function api($apiName = null)
    {
        
        $repo = $this->container->make(Repository::class);

        return $repo->createApi($apiName ?: $this->defaultApi());
    }
public function api ( $ apiName = null ) { /** @var Repository $repo */ $ repo = $ this -> container -> make ( Repository :: class ) ; return $ repo -> createApi ( $ apiName ? : $ this -> defaultApi ( ) ) ; }
Get an API by name.

@param string|null $apiName
@return Api
@throws RuntimeException
if the API name is invalid.
Get an API by name .