def get_endpoint(api_url, path=''):
 try:
  if (not api_url.endswith('/')):
   api_url += '/'
  if path:
   if path.startswith('/'):
    path = path.lstrip('/')
   if (not path.endswith('/')):
    path += '/'
  return (api_url + path)
 except (AttributeError, KeyError):
  raise ImproperlyConfigured(_('No endpoint was provided for EdxNotes.'))

def get_endpoint ( api_url , path = '' ) : try : if ( not api_url . endswith ( '/' ) ) : api_url += '/' if path : if path . startswith ( '/' ) : path = path . lstrip ( '/' ) if ( not path . endswith ( '/' ) ) : path += '/' return ( api_url + path ) except ( AttributeError , KeyError ) : raise ImproperlyConfigured ( _ ( 'No endpoint was provided for EdxNotes.' ) )
select an endpoint from the service catalog we search the full service catalog for services matching both type and region .