def init_api_object(self): self.api = API(url, username, password, sessionid) self.api.add_user(list_id, '*****@*****.**') self.opt_out = self.api.opt_out_user(list_id, '*****@*****.**') self.user_data = self.api.get_user_info(list_id, '*****@*****.**') self.api.remove_user(list_id, '*****@*****.**')
def init_api_object(self): from time import time self.api = API(url, username, password, sessionid) self.email = '*****@*****.**' % time() # Create the user self.created = self.api.add_user(list_id, self.email, {'Currency': 'USD'}) self.retrieved_currency = \ self.api.get_user_info(list_id, self.email)['COLUMNS']['Currency'] # Remove the user self.removed = self.api.remove_user(list_id, self.email)
def init_api_object(self): self.api = API(url, username, password, sessionid) self.user_info = self.api.get_user_info(list_id, retrieve_email) self.domain_count = \ self.user_info['COLUMNS']['PurchasedDomainCount'] self.new_domain_count = 0 if self.domain_count == '' else \ int(self.domain_count) + 1 self.result = self.api.update_user( list_id, retrieve_email, {'PurchasedDomainCount': self.new_domain_count}) self.updated_user_info = \ self.api.get_user_info(list_id, retrieve_email) self.updated_domain_count = \ self.updated_user_info['COLUMNS']['PurchasedDomainCount']
def init_api_object(self): self.api = API(url, username, password, sessionid) self.data = self.api.get_user_info(list_id, retrieve_email)
def init_api_object(self): self.good_api = API(url, username, password)