|
@@ -39,16 +39,6 @@ class SpaceInfoService(Service):
|
|
|
def _common_parameters(self) -> Dict:
|
|
|
return {'projectId': self._project_id, 'spaceId': self._space_id}
|
|
|
|
|
|
- async def get_season(self) -> Season:
|
|
|
- url = self._base_url.join('duoduo-service/transfer/environment/getSeasonType')
|
|
|
- params = {
|
|
|
- 'projectId': self._project_id,
|
|
|
- 'date': self._now_time,
|
|
|
- }
|
|
|
- raw_info = await self._get(url, params)
|
|
|
-
|
|
|
- return Season(raw_info.get('data'))
|
|
|
-
|
|
|
async def is_customized(self) -> bool:
|
|
|
url = self._base_url.join('duoduo-service/custom-service/custom/timetarget')
|
|
|
time_str = arrow.get(arrow.get(self._now_time, TIME_FMT).shift(minutes=15).timestamp
|
|
@@ -196,6 +186,16 @@ class Duoduo(Service):
|
|
|
self._base_url = URL(server_settings.TRANSFER_HOST)
|
|
|
self._now_time = get_time_str()
|
|
|
|
|
|
+ async def get_season(self) -> Season:
|
|
|
+ url = self._base_url.join('duoduo-service/transfer/environment/getSeasonType')
|
|
|
+ params = {
|
|
|
+ 'projectId': self._project_id,
|
|
|
+ 'date': self._now_time,
|
|
|
+ }
|
|
|
+ raw_info = await self._get(url, params)
|
|
|
+
|
|
|
+ return Season(raw_info.get('data'))
|
|
|
+
|
|
|
async def get_fill_rate(self):
|
|
|
url = self._base_url.join('duoduo-service/review-service/space/report/quarter/query')
|
|
|
payload = {
|