def __init__(self, AccessToken, apiServerAndVersion, timeout=10): ''' :param AccessToken: the current access token :param apiServerAndVersion: the api server URL with api version :param timeout: (optional) the timeout in seconds for each request made, default 10 ''' self.apiClient = APIClient(AccessToken, apiServerAndVersion, timeout=timeout)
def __init__(self, AccessToken, apiServerAndVersion, userAgent, timeout=10, verbose=False): ''' :param AccessToken: the current access token :param apiServerAndVersion: the api server URL with api version :param timeout: (optional) the timeout in seconds for each request made, default 10 :param verbose: (optional) prints verbose output, default False ''' self.apiClient = APIClient(AccessToken, apiServerAndVersion, userAgent=userAgent, timeout=timeout) self.verbose = verbose
def __init__(self): self.qp = {} self.rest_method = 'GET' self.postData = None self.headerParams = None self.list_request = False # TODO change to unit_tests, but need to add projects/run to account? self.myAPI = BaseSpaceAPI(profile="ps_native_hoth") self.api = APIClient(self.myAPI.getAccessToken(), self.myAPI.apiServer)