You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.1 KiB
75 lines
2.1 KiB
import time
|
|
|
|
from sanic import Blueprint, Request
|
|
|
|
from utils.masterdata import get_masterdata
|
|
|
|
from ..common import common_api
|
|
|
|
bp_sif_live = Blueprint("sif_live", url_prefix="live")
|
|
|
|
|
|
|
|
@bp_sif_live.route("liveStatus", methods=["POST"])
|
|
@common_api
|
|
async def liveStatus(request: Request):
|
|
normal_live_status_list = []
|
|
live_difficulty_id = get_masterdata("live.db", "normal_live_m", ["live_difficulty_id"])
|
|
for t in live_difficulty_id:
|
|
normal_live_status_list.append({
|
|
"live_difficulty_id": t[0],
|
|
"status": 1,
|
|
"hi_score": 0,
|
|
"hi_combo_count": 0,
|
|
"clear_cnt": 0,
|
|
"achieved_goal_id_list": []
|
|
})
|
|
|
|
special_live_status_list = []
|
|
live_difficulty_id = get_masterdata("live.db", "special_live_m", ["live_difficulty_id"])
|
|
for t in live_difficulty_id:
|
|
special_live_status_list.append({
|
|
"live_difficulty_id": t[0],
|
|
"status": 1,
|
|
"hi_score": 0,
|
|
"hi_combo_count": 0,
|
|
"clear_cnt": 0,
|
|
"achieved_goal_id_list": []
|
|
})
|
|
|
|
resp = {
|
|
"normal_live_status_list": normal_live_status_list,
|
|
"special_live_status_list": special_live_status_list,
|
|
"training_live_status_list": [],
|
|
"marathon_live_status_list": [],
|
|
"free_live_status_list": [],
|
|
"can_resume_live": True
|
|
}
|
|
return resp
|
|
|
|
|
|
|
|
@bp_sif_live.route("schedule", methods=["POST"])
|
|
@common_api
|
|
async def schedule(request: Request):
|
|
live_list = []
|
|
live_difficulty_id = get_masterdata("live.db", "special_live_m", ["live_difficulty_id"])
|
|
for t in live_difficulty_id:
|
|
live_list.append({
|
|
"live_difficulty_id": 46,
|
|
"start_date": "2000-01-01 00:00:00",
|
|
"end_date": "2099-01-01 00:00:00",
|
|
"is_random": False
|
|
})
|
|
resp = {
|
|
"event_list": [],
|
|
"live_list": live_list,
|
|
"limited_bonus_list": [],
|
|
"limited_bonus_common_list": [],
|
|
"random_live_list": [],
|
|
"free_live_list": [],
|
|
"training_live_list": []
|
|
}
|
|
return resp
|
|
|