def insert_account(account, system_id, allocated, allocation_end): sql = "insert into account(username,password,provider,model,ios,device_id,system_id,allocated,allocation_end) values (%s,%s,%s,%s,%s,%s,%s,%s,%s)" params = (account["username"], account["password"], auth_service(account), account.get("model"), account.get("iOS"), device_id(account), system_id, allocated, allocation_end) do_update(sql, params) if "level" in account: update_account_level(account["username"], account["level"])
def sql_insert_account(account, system_id, allocated, allocation_end): sql = "INSERT INTO account(username,password,provider,model,ios,device_id,system_id,allocated,allocation_end) " \ "VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s)" params = (account["username"], account["password"], auth_service(account), account.get("model"), account.get("iOS"), device_id(account), system_id, allocated, allocation_end) return sql, params
def __create_account_object(self, account): return Account2(account["username"], account["password"], auth_service(account), self.args, self.search_interval, self.rest_interval, self.apiHashGenerator, self.apiLoginHashGenerator, self.ptc_proxy_supplier_to_use(), self.niantic_proxy_supplier_to_use(), {}, self)
def create_account2(self, account): username = account["username"] password = account["password"] auth = auth_service(account) created = Account2(username, password, auth, self.args, self.search_interval, self.rest_interval, self.apiHashGenerator, self.apiLoginHashGenerator, self.ptc_proxy_supplier_to_use(), self.niantic_proxy_supplier_to_use(), account, self) return created
def __create_account_objects(self, accts): result = [] for account in accts: account = Account2(account["username"], account["password"], auth_service(account), self.args, self.search_interval, self.rest_interval, self.apiHashGenerator, self.apiLoginHashGenerator, self.__ptc_proxy_supplier_to_use(), self.__niantic_proxy_supplier_to_use(), {}, self) result.append(account) return result