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

Method get_used_headers

RoverSign/utils/api/requests.py:85–111  ·  view source on GitHub ↗
(
        self,
        cookie: str,
        uid: str,
        needToken: bool = False,
        game_id: Optional[int] = WAVES_GAME_ID,
    )

Source from the content-addressed store, hash-verified

83 return waves_user
84
85 async def get_used_headers(
86 self,
87 cookie: str,
88 uid: str,
89 needToken: bool = False,
90 game_id: Optional[int] = WAVES_GAME_ID,
91 ) -> Dict[str, Any]:
92 headers = {
93 "did": "",
94 "b-at": "",
95 }
96 if needToken:
97 headers["token"] = cookie
98 waves_user: Optional[WavesUser] = await WavesUser.select_data_by_cookie_and_uid(
99 cookie=cookie,
100 uid=uid,
101 game_id=game_id,
102 ) or await WavesUser.select_data_by_cookie(
103 cookie=cookie,
104 )
105
106 if not waves_user:
107 return headers
108
109 headers["did"] = waves_user.did or ""
110 headers["b-at"] = waves_user.bat or ""
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

Callers 12

refresh_dataMethod · 0.95
login_logMethod · 0.95
get_daily_infoMethod · 0.95
sign_inMethod · 0.95
sign_in_task_listMethod · 0.95
find_role_listMethod · 0.95
get_taskMethod · 0.95
get_form_listMethod · 0.95
do_likeMethod · 0.95
do_sign_inMethod · 0.95
do_post_detailMethod · 0.95
do_shareMethod · 0.95

Calls 2

select_data_by_cookieMethod · 0.80

Tested by

no test coverage detected