def post(self): OHHOLog.print_log("start register") the_post = Post() OHHOLog.print_log("set the post") self.set_format(the_post.get_format(self)) username = the_post.get_username(self) OHHOLog.print_log("get username") password = the_post.get_password(self) code = the_post.get_code(self) cellphone = the_post.get_cellphone_number(self) country_code = the_post.get_cellphone_country_code(self) if not country_code: country_code = "+86" identity_id = the_post.get_device_identity_id(self) mac_address = the_post.get_device_mac_address(self) imei = the_post.get_imei(self) base_url = the_post.get_base_url(self) register_dict = dict() OHHOLog.print_log("get all parameters") register_dict["username"] = username register_dict["password"] = password register_dict["code"] = code register_dict["identity_id"] = identity_id register_dict["mac_address"] = mac_address register_dict["imei"] = imei register_dict["cellphone"] = cellphone register_dict["country_code"] = country_code cellphone_dict = the_post.get_cellphone(self) instance = LogicRegister(register_dict, cellphone_dict) result = instance.register(base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) base_url = the_post.get_base_url(self) instance = LogicPollingGetMatchApply() result = instance.get(user_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) base_url = the_post.get_base_url(self) positions = LogicGetMapPositions() result = positions.get(user_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) base_url = the_post.get_base_url(self) instance = LogicMeetTopic() result = instance.meet_topic() return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) base_url = the_post.get_base_url(self) instance = LogicListApplyFriend() result = instance.list_apply_friend(user_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) base_url = the_post.get_base_url(self) instance = LogicListBlacks() result = instance.list_blacks(user_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_friend_id(self) base_url = the_post.get_base_url(self) instance = LogicGetMapPositions() result = instance.get(user_id, base_url) return self.response(result)
def post(self): the_get = Post() self.set_format(the_get.get_format(self)) user_id = the_get.get_user_id(self) identity_id = the_get.get_device_identity_id(self) base_url = the_get.get_base_url(self) instance = LogicMatch() result = instance.match_version3(user_id, base_url, identity_id) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = int(the_post.get_user_id(self)) friend_id = int(the_post.get_friend_id(self)) base_url = the_post.get_base_url(self) apply_id = the_post.get_apply_id(self) instance = LogicAgreeMeet() result = instance.agree_meet(user_id, friend_id, apply_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) apply_id = the_post.get_apply_id(self) friend_user_id = the_post.get_friend_id(self) base_url = the_post.get_base_url(self) instance = LogicMetByDevice() result = instance.met(user_id, friend_user_id, apply_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) friend_user_id = the_post.get_friend_id(self) is_apply = the_post.get_is_apply(self) base_url = the_post.get_base_url(self) instance = LogicPollingGetMatchState() result = instance.get(user_id, friend_user_id, is_apply, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) friend_id = the_post.get_friend_id(self) match_condition_id = the_post.get_match_condition_id(self) base_url = the_post.get_base_url(self) instance = LogicApplyMeet() result = instance.apply_meet(user_id, friend_id, match_condition_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) last_id = the_post.get_last_id(self) limit = the_post.get_limit(self) base_url = the_post.get_base_url(self) instance = LogicMeet() result = instance.met(user_id, last_id, limit, base_url) return self.response(result)
def post(self): the_post = Post() user_id = the_post.get_user_id(self) friend_user_id = the_post.get_friend_id(self) format = the_post.get_format(self) base_url = the_post.get_base_url(self) if format: self.set_format(format) else: self.set_format() instance = LogicGetUserInformation() result = instance.get(friend_user_id, user_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) base_url = the_post.get_base_url(self) # data = the_post.get_data(self) # user_extension_dict = json.loads(data) # if user_extension_dict.get("interest", None): # user_extension_dict["interest"] = json.dumps(user_extension_dict["interest"]) instance = LogicGetUserPersonalInformation() result = instance.get(user_id, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) apply_id = the_post.get_apply_id(self) identity_id = the_post.get_device_identity_id(self) rssi = the_post.get_device_rssi(self) distance = the_post.get_device_distance(self) base_url = the_post.get_base_url(self) instance = LogicBluetoothPosition() result = instance.bluetooth_position(user_id, identity_id, rssi, distance, apply_id, base_url) return self.response(result)
def post(self): the_request = Post() self.set_format(the_request.get_format(self)) map_information = the_request.get_map_information(self) user_id = the_request.get_user_id(self) another_user_id = self.get_body_argument("another_user_id", 0) timestamp = the_request.get_timestamp(self) base_url = the_request.get_base_url(self) instance = LogicTestAddMapInformation() OHHOLog.print_log(map_information) result = instance.add(user_id, another_user_id, map_information, base_url, timestamp) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) username = the_post.get_username(self) password = the_post.get_password(self) country_code = the_post.get_cellphone_country_code(self) cellphone_dict = the_post.get_cellphone(self) base_url = the_post.get_base_url(self) code = the_post.get_code(self) instance = LogicLoginByCode() result = instance.authenticate(country_code, username, password, cellphone_dict, base_url, code) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) country_code = the_post.get_cellphone_country_code(self) cellphone_key = the_post.get_cellphone_key(self) cellphone_number = the_post.get_cellphone_number(self) cellphone_dict = the_post.get_cellphone(self) code = the_post.get_code(self) base_url = the_post.get_base_url(self) instance = LogicRebindCellphone() result = instance.rebind_cellphone(cellphone_key, cellphone_number, code, base_url, cellphone_dict, country_code) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) # the_header = Headers() user_id = the_post.get_user_id(self) # user_id = user_id if user_id else the_header.get_user_id(self) # return self.write(self.request.files.get("icon")) image_file = self.request.files.get("icon") image_sequence = the_post.get_sequence(self) base_url = the_post.get_base_url(self) instance = LogicAddUserIcon() result = instance.add_user_icon(user_id, image_file, base_url, image_sequence) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) cellphone_number = the_post.get_cellphone_number(self) password = the_post.get_password(self) code = the_post.get_code(self) country_code = the_post.get_cellphone_country_code(self) cellphone_dict = the_post.get_cellphone(self) cellphone_dict = cellphone_dict if cellphone_dict else dict() base_url = the_post.get_base_url(self) instance = LogicResetPassword() result = instance.reset_password(cellphone_number, password, code, country_code, cellphone_dict, base_url) return self.response(result)
def post(self): the_post = Post() self.set_format(the_post.get_format(self)) device_identities = the_post.get_device_identities(self) user_id = the_post.get_user_id(self) name = the_post.get_name(self) base_url = the_post.get_base_url(self) conditions = the_post.get_conditions(self) if conditions: condition_dict = OHHOOperation.json2dict(conditions) else: condition_dict = dict() instance = LogicMatch() result = instance.match(device_identities, user_id, name, condition_dict, base_url) return self.response(result)
def post(self): user = User() the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) friend_user_id = the_post.get_friend_id(self) apply_id = the_post.get_apply_id(self) category = the_post.get_category(self) reason = the_post.get_reason(self) content = the_post.get_content(self) base_url = the_post.get_base_url(self) cancel_meet = LogicCancelMeet() cancel_meet.cancel_meet(user_id, friend_user_id, apply_id, base_url) feedback = LogicAddCancelMeetFeedback() result = feedback.add_feedback(user_id, friend_user_id, apply_id, reason, content, category) information = user.get_cancel_meet_user_information(user_id, apply_id, base_url) information["message"] = content user.push_user_information(friend_user_id, PUSH_STATE_TYPE_CANCEL_MEET, information) return self.response(result)