forked from Hay1tsme/artemis
添加 titles/fgoa/base.py
This commit is contained in:
parent
e836168b7d
commit
f060e1258a
30
titles/fgoa/base.py
Normal file
30
titles/fgoa/base.py
Normal file
@ -0,0 +1,30 @@
|
||||
from datetime import date, datetime, timedelta
|
||||
from typing import Any, Dict, List
|
||||
import json
|
||||
import logging
|
||||
from enum import Enum
|
||||
|
||||
from core.config import CoreConfig
|
||||
from titles.fgoa.config import FGOAConfig
|
||||
from titles.fgoa.const import FGOAConstants
|
||||
|
||||
|
||||
class FGOABase:
|
||||
def __init__(self, core_cfg: CoreConfig, game_cfg: FGOAConfig) -> None:
|
||||
self.core_cfg = core_cfg
|
||||
self.game_config = game_cfg
|
||||
self.date_time_format = "%Y-%m-%d %H:%M:%S"
|
||||
self.date_time_format_ext = (
|
||||
"%Y-%m-%d %H:%M:%S.%f" # needs to be lopped off at [:-5]
|
||||
)
|
||||
self.date_time_format_short = "%Y-%m-%d"
|
||||
self.logger = logging.getLogger("fgoa")
|
||||
self.game = FGOAConstants.GAME_CODE
|
||||
self.version = FGOAConstants.VER_FGOA_SEASON_1
|
||||
|
||||
@staticmethod
|
||||
def _parse_int_ver(version: str) -> str:
|
||||
return version.replace(".", "")[:3]
|
||||
|
||||
async def handle_game_init_request(self, data: Dict) -> Dict:
|
||||
return f""
|
Loading…
Reference in New Issue
Block a user