filcole / pycarwings2

Python library for interacting with the NissanConnect EV (aka CARWINGS) telematics service.
Apache License 2.0
33 stars 20 forks source link

Add default for when UserVehicleBoundTime isn't there #22

Closed a-u-s-t-i-n closed 3 years ago

a-u-s-t-i-n commented 4 years ago

I don't seem to have the "UserVehicleBoundTime" in the json I get from Nissan. Possibly they're still in the process of verifying that I own my leaf, but if I make this change I'm able to run the examples and I wasn't able to run the examples without the change.

In particular, I'm seeing the following in my json:

... "CustomerInfo": {
"UserId": "...",
"Language": "en-US",
"Timezone": "America/New_York",
"RegionCode": "NNA",
"OwnerId": "...",
"EMailAddress": "...",
"Nickname": "...",
"Country": "US",
"VehicleImage": "/content/language/default/images/img/ph_car.jpg",
"UserVehicleBoundDurationSec": "...",
"VehicleInfo": {
"CarName": "",
"CarImage": "carimg_w.png" }
}, ...