上传文件至 /
This commit is contained in:
37
ActionUnlockItem.py
Normal file
37
ActionUnlockItem.py
Normal 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
|
||||
Reference in New Issue
Block a user