mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-16 07:10:09 -07:00
22 lines
580 B
Python
22 lines
580 B
Python
import requests
|
|
|
|
GATEWAY_URL = 'https://kic.lgthinq.com:46030/api/common/gatewayUriList'
|
|
APP_KEY = 'wideq'
|
|
SECURITY_KEY = 'nuts_securitykey'
|
|
DATA_ROOT = 'lgedmRoot'
|
|
|
|
|
|
def gateway_info(country='US', lang='en-US'):
|
|
req_data = {DATA_ROOT: {'countryCode': country, 'langCode': lang}}
|
|
headers = {
|
|
'x-thinq-application-key': APP_KEY,
|
|
'x-thinq-security-key': SECURITY_KEY,
|
|
'Accept': 'application/json',
|
|
}
|
|
res = requests.post(GATEWAY_URL, json=req_data, headers=headers)
|
|
return res.json()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
print(gateway_info())
|