def __init__(self, apikey=None, timeout=None, verbose=False): headers = {} if apikey: headers['apikey'] = apikey _api = API(timeout=timeout, verbose=verbose) def api(method, uri, attrs={}): return _api.request(method, self.API_URL + uri, attrs, headers) self.appliances = Appliances(api) self.servers = Servers(api) self.backups = Backups(api)
def __init__(self, apikey=None, subkey=None): self.apikey = apikey self.subkey = subkey self.api = API()
def __init__(self): self.api = API()