class ApiClient(object): def __init__( self, host, token, user_id ): # user_id is ignored - provided only for library compatibility self._connection = Connect(host, token) def connection(self): return self._connection def get_url_registry(self): return self._connection.meta_data() def __getattr__(self, attrname): try: return ResourceAccessor(attrname, self._connection) except: raise AttributeError raise AttributeError
class ApiClient(object): def __init__(self, host, token, user_id): # user_id is ignored - provided only for library compatibility self._connection = Connect(host, token) @property def connection(self): return self._connection def get_url_registry(self): return self._connection.meta_data() def __getattr__(self, attrname): try: return ResourceAccessor(attrname, self._connection) except: raise AttributeError raise AttributeError
def __init__( self, host, token, user_id ): # user_id is ignored - provided only for library compatibility self._connection = Connect(host, token)
def __init__(self, host, token, user_id): # user_id is ignored - provided only for library compatibility self._connection = Connect(host, token)