38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
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
|