hyundai-kia-connect-api 3.32.4__py2.py3-none-any.whl → 3.32.6__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,10 +124,11 @@ class ApiImpl:
124
124
  + "&format=json&addressdetails=1&zoom=18"
125
125
  + email_parameter
126
126
  )
127
+ headers = {"user-agent": "curl/7.81.0"}
127
128
  _LOGGER.debug(
128
129
  f"{DOMAIN} - Running update geocode location with value: {url}"
129
130
  )
130
- response = requests.get(url)
131
+ response = requests.get(url, headers=headers)
131
132
  _LOGGER.debug(f"{DOMAIN} - geocode location raw response: {response}")
132
133
  try:
133
134
  response = response.json()
@@ -22,7 +22,6 @@ from .const import (
22
22
  DISTANCE_UNITS,
23
23
  DOMAIN,
24
24
  ENGINE_TYPES,
25
- LOGIN_TOKEN_LIFETIME,
26
25
  OrderStatus,
27
26
  SEAT_STATUS,
28
27
  TEMPERATURE_UNITS,
@@ -37,9 +36,6 @@ from .utils import (
37
36
  parse_datetime,
38
37
  )
39
38
 
40
-
41
- CIPHERS = "ALL:@SECLEVEL=0"
42
-
43
39
  _LOGGER = logging.getLogger(__name__)
44
40
 
45
41
 
@@ -64,17 +60,19 @@ class KiaUvoApiCA(ApiImpl):
64
60
  self.old_vehicle_status = {}
65
61
  self.API_URL: str = "https://" + self.BASE_URL + "/tods/api/"
66
62
  self.API_HEADERS = {
67
- "content-type": "application/json;charset=UTF-8",
63
+ "content-type": "application/json",
68
64
  "accept": "application/json, text/plain, */*",
69
65
  "accept-encoding": "gzip, deflate, br",
70
66
  "accept-language": "en-US,en;q=0.9",
71
- "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36", # noqa
67
+ "user-agent": "MyHyundai/2.0.25 (iPhone; iOS 18.3.1; Scale/3.00)", # noqa
72
68
  "host": self.BASE_URL,
69
+ "client_id": "HATAHSPACA0232141ED9722C67715A0B",
70
+ "client_secret": "CLISCR01AHSPA",
73
71
  "origin": "https://" + self.BASE_URL,
74
72
  "referer": "https://" + self.BASE_URL + "/login",
75
- "from": "CWP",
73
+ "from": "SPA",
76
74
  "language": "0",
77
- "offset": "0",
75
+ "offset": "-5",
78
76
  "sec-fetch-dest": "empty",
79
77
  "sec-fetch-mode": "cors",
80
78
  "sec-fetch-site": "same-origin",
@@ -121,12 +119,13 @@ class KiaUvoApiCA(ApiImpl):
121
119
  response = response.json()
122
120
  self._check_response_for_errors(response)
123
121
  response = response["result"]["token"]
122
+ token_expire_in = int(response["expireIn"]) - 60
124
123
  access_token = response["accessToken"]
125
124
  refresh_token = response["refreshToken"]
126
125
  _LOGGER.debug(f"{DOMAIN} - Access Token Value {access_token}")
127
126
  _LOGGER.debug(f"{DOMAIN} - Refresh Token Value {refresh_token}")
128
127
 
129
- valid_until = dt.datetime.now(pytz.utc) + LOGIN_TOKEN_LIFETIME
128
+ valid_until = dt.datetime.now(pytz.utc) + dt.timedelta(seconds=token_expire_in)
130
129
 
131
130
  return Token(
132
131
  username=username,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.32.4
3
+ Version: 3.32.6
4
4
  Summary: Python Boilerplate contains all the boilerplate you need to create a Python package.
5
5
  Home-page: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api
6
6
  Author: Fuat Akgun
@@ -1,8 +1,8 @@
1
- hyundai_kia_connect_api/ApiImpl.py,sha256=mZO8AT-MBMBFspB7sZ2MkK_uxbbJ59J3rM_uJmU4-fE,7737
1
+ hyundai_kia_connect_api/ApiImpl.py,sha256=sgUXOcQnBMTVylxOLeqnYOGnz9KqLqRClRpE12u6ZS4,7806
2
2
  hyundai_kia_connect_api/ApiImplType1.py,sha256=PnKwpbCoYGOXBWzBLIlDSrC6daIYeW9qlfW7TM4HCU0,12184
3
3
  hyundai_kia_connect_api/HyundaiBlueLinkApiUSA.py,sha256=Tx-L4ZWiPhq-uHcjWSUzjLEsfunV6nzyzqQpjPTYuIo,36831
4
4
  hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=tslh0gzvPBwYJmcWlf9B0l7PyYZdy2e7GqpRkl8_Svk,48471
5
- hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=uAAsKwXk8E-1HsLuOYBDb1cowHo2Qfgn6Cmf5fmP-UM,31721
5
+ hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=IOiInYhUID1Vg15ChooBr7p8x1bwAUIGyZw7QqxmD80,31767
6
6
  hyundai_kia_connect_api/KiaUvoApiCN.py,sha256=cwIPZ0dU6HolKdooUQeQKlLAic6YU8dQmNs0VQDBgpQ,47035
7
7
  hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=TxgO2dfLjKSKfSkRMoTL_fbmzRFRPb8oJ9IDztD50Ug,71300
8
8
  hyundai_kia_connect_api/KiaUvoApiUSA.py,sha256=G2sGtv88sBZuAz8qKYq_3_JNXIkxEjOBAzwM6R8GUi0,30548
@@ -14,10 +14,10 @@ hyundai_kia_connect_api/bluelink.py,sha256=sBU7hlElie21GU4Ma-i4a5vdztGc2jtmlVBbb
14
14
  hyundai_kia_connect_api/const.py,sha256=scBlhrMims0W6_pESVVdQz2uUxczg2cf2qDQ7avbhVo,2174
15
15
  hyundai_kia_connect_api/exceptions.py,sha256=m7gyDnvA5OVAK4EXSP_ZwE0s0uV8HsGUV0tiYwqofK0,1343
16
16
  hyundai_kia_connect_api/utils.py,sha256=J0aXUX-nKIoS3XbelatNh-DZlHRU2_DYz_Mg_ZUKQJU,1957
17
- hyundai_kia_connect_api-3.32.4.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
18
- hyundai_kia_connect_api-3.32.4.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
19
- hyundai_kia_connect_api-3.32.4.dist-info/METADATA,sha256=td3I1luOoCaSb-4YKnw38X65K0ro0IP1vhdXs7WPEhY,6872
20
- hyundai_kia_connect_api-3.32.4.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
21
- hyundai_kia_connect_api-3.32.4.dist-info/entry_points.txt,sha256=XfrroRdyC_9q9VXjEZe5SdRPhkQyCCE4S7ZK6XSKelA,67
22
- hyundai_kia_connect_api-3.32.4.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
23
- hyundai_kia_connect_api-3.32.4.dist-info/RECORD,,
17
+ hyundai_kia_connect_api-3.32.6.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
18
+ hyundai_kia_connect_api-3.32.6.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
19
+ hyundai_kia_connect_api-3.32.6.dist-info/METADATA,sha256=jjben-2hXumIpGCKPJ32VFTlgKLJAq9O5o8tf6RkflE,6872
20
+ hyundai_kia_connect_api-3.32.6.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
21
+ hyundai_kia_connect_api-3.32.6.dist-info/entry_points.txt,sha256=XfrroRdyC_9q9VXjEZe5SdRPhkQyCCE4S7ZK6XSKelA,67
22
+ hyundai_kia_connect_api-3.32.6.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
23
+ hyundai_kia_connect_api-3.32.6.dist-info/RECORD,,