Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def epicgames_get_exchange_data(self, xsrf_token: str) -> dict:
headers = {
'x-xsrf-token': xsrf_token
}
r = EpicGames('/id/api/exchange/generate')
return await self.post(r, headers=headers)
async def epicgames_redirect(self, xsrf_token: str) -> Any:
headers = {
'x-xsrf-token': xsrf_token
}
return await self.get(EpicGames('/id/api/redirect'), headers=headers)
async def epicgames_get_csrf(self) -> aiohttp.ClientResponse:
return await self.get(EpicGames('/id/api/csrf'), raw=True)
async def epicgames_reputation(self, xsrf_token: str) -> Any:
headers = {
'x-xsrf-token': xsrf_token
}
return await self.get(EpicGames('/id/api/reputation'), headers=headers)
async def epicgames_login(self, email: str,
password: str,
xsrf_token: str) -> Any:
headers = {
'x-xsrf-token': xsrf_token
}
payload = {
'email': email,
'password': password,
'rememberMe': False,
'captcha': ''
}
return await self.post(EpicGames('/id/api/login'),
headers=headers,
data=payload)
async def epicgames_mfa_login(self, method: str,
code: str,
xsrf_token: str) -> Any:
headers = {
'x-xsrf-token': xsrf_token
}
payload = {
'code': code,
'method': method,
'rememberDevice': False
}
return await self.post(EpicGames('/id/api/login/mfa'),
headers=headers,
data=payload)