MCPcopy Create free account
hub / github.com/Loping151/RoverSign / get_self_waves_ck

Method get_self_waves_ck

RoverSign/utils/api/requests.py:113–138  ·  view source on GitHub ↗
(
        self, uid: str, user_id: str, bot_id: str
    )

Source from the content-addressed store, hash-verified

111 return headers
112
113 async def get_self_ck(
114 self, uid: str, user_id: str, bot_id: str, game_id: int = WAVES_GAME_ID
115 ) -> Optional[str]:
116 # 返回空串 表示绑定已失效
117 waves_user = await WavesUser.select_waves_user(uid, user_id, bot_id, game_id=game_id)
118 if not waves_user or not waves_user.cookie:
119 return ""
120
121 if waves_user.status == "无效":
122 return ""
123
124 data = await self.login_log(uid, waves_user.cookie, game_id=game_id)
125 if not data.success:
126 await data.mark_cookie_invalid(uid, waves_user.cookie)
127 return ""
128
129 data = await self.refresh_data(uid, waves_user.cookie, game_id=game_id)
130 if not data.success:
131 if data.is_bat_token_invalid:
132 if waves_user := await self.refresh_bat_token(waves_user):
133 return waves_user.cookie
134 else:
135 await data.mark_cookie_invalid(uid, waves_user.cookie)
136 return ""
137
138 return waves_user.cookie
139
140 async def get_self_waves_ck(
141 self, uid: str, user_id: str, bot_id: str

Callers 2

open_switch_funcFunction · 0.80
rover_sign_up_handlerFunction · 0.80

Calls 5

login_logMethod · 0.95
refresh_dataMethod · 0.95
refresh_bat_tokenMethod · 0.95
select_waves_userMethod · 0.80
mark_cookie_invalidMethod · 0.45

Tested by

no test coverage detected