forked from Fragrance/maquitous
unlock > unlock_all
This commit is contained in:
parent
5ecb34920a
commit
01c270caa7
@ -58,7 +58,7 @@ You send your information to __Maquitous__, __Maquitous__ transfer your informat
|
||||
"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`
|
||||
Response:
|
||||
|
8
main.py
8
main.py
@ -38,7 +38,7 @@ def bad_request(e):
|
||||
|
||||
@app.route("/")
|
||||
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")
|
||||
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})
|
||||
return data, returnCode
|
||||
|
||||
@app.route("/unlock")
|
||||
@app.route("/unlock_all")
|
||||
def unlock_process():
|
||||
userId = request.args.get('userid')
|
||||
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:
|
||||
userId = int(userId)
|
||||
timestamp = int(time.time())
|
||||
@ -183,7 +183,7 @@ def unlock_process():
|
||||
status = "200 OK"
|
||||
info = "Succeed."
|
||||
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
|
||||
|
||||
@app.route("/music", methods=['POST'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user