hyundai-kia-connect-api 3.17.7__py2.py3-none-any.whl → 3.17.8__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.
@@ -82,24 +82,25 @@ class ApiImpl:
82
82
  def update_geocoded_location(
83
83
  self, token: Token, vehicle: Vehicle, use_email: bool
84
84
  ) -> None:
85
- email_parameter = ""
86
- if use_email is True:
87
- email_parameter = "&email=" + token.username
88
-
89
- url = (
90
- "https://nominatim.openstreetmap.org/reverse?lat="
91
- + str(vehicle.location_latitude)
92
- + "&lon="
93
- + str(vehicle.location_longitude)
94
- + "&format=json&addressdetails=1&zoom=18"
95
- + email_parameter
96
- )
97
- response = requests.get(url)
98
- response = response.json()
99
- vehicle.geocode = (
100
- get_child_value(response, "display_name"),
101
- get_child_value(response, "address"),
102
- )
85
+ if vehicle.location_latitude and vehicle.location_longitude:
86
+ email_parameter = ""
87
+ if use_email is True:
88
+ email_parameter = "&email=" + token.username
89
+
90
+ url = (
91
+ "https://nominatim.openstreetmap.org/reverse?lat="
92
+ + str(vehicle.location_latitude)
93
+ + "&lon="
94
+ + str(vehicle.location_longitude)
95
+ + "&format=json&addressdetails=1&zoom=18"
96
+ + email_parameter
97
+ )
98
+ response = requests.get(url)
99
+ response = response.json()
100
+ vehicle.geocode = (
101
+ get_child_value(response, "display_name"),
102
+ get_child_value(response, "address"),
103
+ )
103
104
 
104
105
  def lock_action(self, token: Token, vehicle: Vehicle, action: str) -> str:
105
106
  """Lock or unlocks a vehicle. Returns the tracking ID"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.17.7
3
+ Version: 3.17.8
4
4
  Summary: Python Boilerplate contains all the boilerplate you need to create a Python package.
5
5
  Home-page: https://github.com/fuatakgun/hyundai_kia_connect_api
6
6
  Author: Fuat Akgun
@@ -1,4 +1,4 @@
1
- hyundai_kia_connect_api/ApiImpl.py,sha256=1j5FRTQIILrSzQU6oE5i4J_l8cVvYuMGBmQn-kL7zyg,5018
1
+ hyundai_kia_connect_api/ApiImpl.py,sha256=8qy1OPFzPv2fvj513Eq7OwW8TWB3ZBffQwuuDA_kQB0,5155
2
2
  hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py,sha256=FVWDzmkO_jsc_r4WzufgxaJkeVYhf9UAw9A6r37b-Dc,26750
3
3
  hyundai_kia_connect_api/KiaUvoAPIUSA.py,sha256=kQo3PA_FktsAHhdugZi0lrpMcp96WNXcvBJPbIJIcfY,31217
4
4
  hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=ncAUEWqepHwYTZqu7JDNAozguucqqIg-HKPvpN_54CE,48738
@@ -12,9 +12,9 @@ hyundai_kia_connect_api/__init__.py,sha256=6UwXW6Lj5VnRtWNOt_0dLFdOYlcbysHCc6ol_
12
12
  hyundai_kia_connect_api/const.py,sha256=C25jgV79u7SZF5xDy96gol_CekIkyI4h3goTyDEmng0,1967
13
13
  hyundai_kia_connect_api/exceptions.py,sha256=m7gyDnvA5OVAK4EXSP_ZwE0s0uV8HsGUV0tiYwqofK0,1343
14
14
  hyundai_kia_connect_api/utils.py,sha256=rfhERPXkzqelsaieLtiAyN9xDDTheNyKX5aBPRLrHf4,1117
15
- hyundai_kia_connect_api-3.17.7.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
16
- hyundai_kia_connect_api-3.17.7.dist-info/LICENSE,sha256=AsZwIRViAze7ObwO6V6IB0q4caXv6DJS2-3dsU1FWy8,1069
17
- hyundai_kia_connect_api-3.17.7.dist-info/METADATA,sha256=3N_FsIfSbVbuxz3W8iw3fk3DDlPL2b680qMONi-UyTk,5770
18
- hyundai_kia_connect_api-3.17.7.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
19
- hyundai_kia_connect_api-3.17.7.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
20
- hyundai_kia_connect_api-3.17.7.dist-info/RECORD,,
15
+ hyundai_kia_connect_api-3.17.8.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
16
+ hyundai_kia_connect_api-3.17.8.dist-info/LICENSE,sha256=AsZwIRViAze7ObwO6V6IB0q4caXv6DJS2-3dsU1FWy8,1069
17
+ hyundai_kia_connect_api-3.17.8.dist-info/METADATA,sha256=X_zOcTNE0C9frh4H4KNRh1MC6b0yuNbonx8cqoUTzHU,5770
18
+ hyundai_kia_connect_api-3.17.8.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
19
+ hyundai_kia_connect_api-3.17.8.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
20
+ hyundai_kia_connect_api-3.17.8.dist-info/RECORD,,