Example #1
0
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
Example #2
0
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
Example #3
0
 def __init__(
     self, host, token, user_id
 ):  # user_id is ignored - provided only for library compatibility
     self._connection = Connect(host, token)
Example #4
0
 def __init__(self, host, token, user_id): # user_id is ignored - provided only for library compatibility
     self._connection = Connect(host, token)