上传文件至 /

This commit is contained in:
2025-10-13 18:15:05 +08:00
parent 2a198c3da6
commit c4e2150acf
18 changed files with 1178 additions and 1 deletions

37
ActionUnlockItem.py Normal file
View File

@@ -0,0 +1,37 @@
from loguru import logger
from Config import *
from HelperLogInOut import apiLogin, apiLogout, generateTimestamp
from HelperUnlockThing import implUnlockThing
def implUnlockSingleItem(itemId: int, itemKind: int, userId: int, currentLoginTimestamp:int, currentLoginResult) -> str:
userItemList = [
{
"itemKind": itemKind,
"itemId": itemId,
"stock": 1,
"isValid": True
}
]
unlockThingResult = implUnlockThing(userItemList, userId, currentLoginTimestamp, currentLoginResult)
return unlockThingResult
def implUnlockMusic(musicToBeUnlocked: int, userId: int, currentLoginTimestamp:int, currentLoginResult) -> str:
userItemList = [
{
"itemKind": 5,
"itemId": musicToBeUnlocked,
"stock": 1,
"isValid": True
},
{
"itemKind": 6,
"itemId": musicToBeUnlocked,
"stock": 1,
"isValid": True
},
]
unlockThingResult = implUnlockThing(userItemList, userId, currentLoginTimestamp, currentLoginResult)
return unlockThingResult