diff --git a/connectedcar/vehicle.py b/connectedcar/vehicle.py index 841af9d..5773cba 100644 --- a/connectedcar/vehicle.py +++ b/connectedcar/vehicle.py @@ -14,6 +14,7 @@ def __init__(self, vehicle_id, access_token, region="US"): """ self.access_token = access_token self.vehicle_id = vehicle_id + self.region = region self.api = Api(access_token, region) def status(self): @@ -136,6 +137,22 @@ def capability(self): const.USER_URL, 'capability/v1/vehicles/' + self.vehicle_id) return response.json() + def recall_status(self): + """ GET Vehicle.recall_status + Note: Currently only supported in US regions. + + Returns: + Response: Vehicle recall status + + Raises: + SyncException + + """ + + response = self.api.get( + const.USER_URL, 'recall/v2/recalls?vin='+self.vehicle_id+'&language=EN®ion=US&country=USA') + return response.json() + def vin(self): """ GET Vehicle.vin