forked from Fragrance/maquitous
unlock > unlock_all
This commit is contained in:
@@ -58,7 +58,7 @@ You send your information to __Maquitous__, __Maquitous__ transfer your informat
|
|||||||
"userId": integer
|
"userId": integer
|
||||||
}
|
}
|
||||||
|
|
||||||
- `GET /unlock?userid=userId` - Unlock all DX Master Charts in account.
|
- `GET /unlock_all?userid=userId` - Unlock all DX Master Charts in account.
|
||||||
|
|
||||||
Params: `userId`
|
Params: `userId`
|
||||||
Response:
|
Response:
|
||||||
|
|||||||
8
main.py
8
main.py
@@ -38,7 +38,7 @@ def bad_request(e):
|
|||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
return jsonify({"status": "200 OK", "timestamp": int(time.time()), "info": "Project Fragrance","availableApi": ["qr", "ticket", "mapstock", "unlock", "map", "bonus"], "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8')}), 200
|
return jsonify({"status": "200 OK", "timestamp": int(time.time()), "info": "Project Fragrance","availableApi": ["qr", "ticket", "mapstock", "unlock_all", "map", "bonus"], "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8')}), 200
|
||||||
|
|
||||||
@app.route("/qr")
|
@app.route("/qr")
|
||||||
def qr_to_userid():
|
def qr_to_userid():
|
||||||
@@ -156,11 +156,11 @@ def mapstock_process():
|
|||||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "apiName": "mapstock", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "apiName": "mapstock", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||||
return data, returnCode
|
return data, returnCode
|
||||||
|
|
||||||
@app.route("/unlock")
|
@app.route("/unlock_all")
|
||||||
def unlock_process():
|
def unlock_process():
|
||||||
userId = request.args.get('userid')
|
userId = request.args.get('userid')
|
||||||
if userId is None or userId.isdigit() is False or len(str(userId)) != 8:
|
if userId is None or userId.isdigit() is False or len(str(userId)) != 8:
|
||||||
return jsonify({"apiName": "unlock", "apiInfo": "Unlock All DX Master Charts.", "apiUsage": "/unlock?userid=<userId>"})
|
return jsonify({"apiName": "unlock", "apiInfo": "Unlock All DX Master Charts.", "apiUsage": "/unlock_all?userid=<userId>"})
|
||||||
else:
|
else:
|
||||||
userId = int(userId)
|
userId = int(userId)
|
||||||
timestamp = int(time.time())
|
timestamp = int(time.time())
|
||||||
@@ -183,7 +183,7 @@ def unlock_process():
|
|||||||
status = "200 OK"
|
status = "200 OK"
|
||||||
info = "Succeed."
|
info = "Succeed."
|
||||||
log = {"UserLoginApiStatus": 1, "UploadUserPlaylogApiStatus": 1, "UpsertUserAllApi": 1, "UserLogoutApiStatus": 1}
|
log = {"UserLoginApiStatus": 1, "UploadUserPlaylogApiStatus": 1, "UpsertUserAllApi": 1, "UserLogoutApiStatus": 1}
|
||||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "apiName": "unlock", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "apiName": "unlock_all", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||||
return data, returnCode
|
return data, returnCode
|
||||||
|
|
||||||
@app.route("/music", methods=['POST'])
|
@app.route("/music", methods=['POST'])
|
||||||
|
|||||||
Reference in New Issue
Block a user