def data(uuid, version): dst_json = user_json.replace('REPLACE_APIVERSION', version) auth_user_dict = json.loads(dst_json) auth_user_text = SecureUtil.createhaders(auth_user_dict, uuid) csum_ans = SecureUtil.csum(auth_user_text + uuid) auth_user_data = 'request={0}&csum={1}&ott=0'.format( auth_user_text, csum_ans) return auth_user_data
def data(uuid, ott, mtype, tab_id, version): dst_json = user_json.replace('REPLACE_APIVERSION', version) auth_user_dict = json.loads(dst_json) hash = [] item = {"type": mtype.value, "hash": "", "timing": 0, "tag_id": tab_id} hash.append(item) auth_user_dict["hash"] = hash """ for emasterdata in emasterdata_server: item = {"type": emasterdata.value , "hash": "", "timing": 0, "tag_id": 0} hash.append(item) auth_user_dict["hash"] = hash """ auth_user_text = SecureUtil.createhaders(auth_user_dict) csum_ans = SecureUtil.csum(auth_user_text + uuid) auth_user_data = 'request={0}&csum={1}&ott={2}'.format( auth_user_text, csum_ans, ott) return auth_user_data