minus improvements
This commit is contained in:
@@ -11,6 +11,15 @@ from HelperGetUserThing import implGetUser_
|
||||
from HelperUploadUserPlayLog import apiUploadUserPlaylog
|
||||
from HelperUserAll import generateFullUserAll
|
||||
|
||||
def apiQueryLoginBonus(userId:int) -> str:
|
||||
'''ログインボーナスを取得する API リクエスター'''
|
||||
data = json.dumps({
|
||||
"userId": int(userId),
|
||||
"nextIndex": 0,
|
||||
"maxCount": 2000
|
||||
})
|
||||
return apiSDGB(data, "GetUserLoginBonusApi", userId)
|
||||
|
||||
def implLoginBonus(userId: int, currentLoginTimestamp:int, currentLoginResult, bonusGenerateMode=2):
|
||||
'''
|
||||
ログインボーナスデータをアップロードする
|
||||
@@ -73,10 +82,10 @@ def implLoginBonus(userId: int, currentLoginTimestamp:int, currentLoginResult, b
|
||||
"nextIndex": 0,
|
||||
"maxCount": 2000
|
||||
})
|
||||
logger.debug(json.loads(apiSDGB(data, "GetUserLoginBonusApi", userId)))
|
||||
finalLoginBonusData = json.loads(apiSDGB(data, "GetUserLoginBonusApi", userId))
|
||||
###### PRODUCTION 用には、上記のコードを削除してください
|
||||
|
||||
return currentUserAllResult
|
||||
return finalLoginBonusData
|
||||
|
||||
def generateLoginBonusList(userId, generateMode=1):
|
||||
'''
|
||||
@@ -88,7 +97,7 @@ def generateLoginBonusList(userId, generateMode=1):
|
||||
# HDDから、ログインボーナスデータを読み込む
|
||||
# アップデートがある場合、このファイルを更新する必要があります
|
||||
# 必ず最新のデータを使用してください
|
||||
with open('loginBonus.json') as file:
|
||||
with open('loginBonus.json', encoding='utf-8') as file:
|
||||
cache = json.load(file)
|
||||
loginBonusIdList = [item['id'] for item in cache]
|
||||
logger.debug(f"ログインボーナスIDリスト: {loginBonusIdList}")
|
||||
|
||||
Reference in New Issue
Block a user