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