mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[api] Add helper to get auth URL
Not currently used, may be useful in the future.
This commit is contained in:
parent
e111ae56fc
commit
53e2accbb0
|
@ -1,6 +1,8 @@
|
|||
# !/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
import urllib.parse
|
||||
|
||||
import requests
|
||||
import requests.adapters
|
||||
import logging
|
||||
|
@ -53,6 +55,11 @@ class EPCAPI:
|
|||
else:
|
||||
self.request_timeout = None
|
||||
|
||||
def get_auth_url(self):
|
||||
login_url = 'https://www.epicgames.com/id/login?redirectUrl='
|
||||
redirect_url = f'https://www.epicgames.com/id/api/redirect?clientId={self._user_basic}&responseType=code'
|
||||
return login_url + urllib.parse.quote(redirect_url)
|
||||
|
||||
def update_egs_params(self, egs_params):
|
||||
# update user-agent
|
||||
if version := egs_params['version']:
|
||||
|
|
Loading…
Reference in a new issue