From 5f26c02b2ce8cdcb07616cf9c4fdafbfdf69d357 Mon Sep 17 00:00:00 2001 From: eho Date: Tue, 28 Sep 2021 23:11:55 +0200 Subject: [PATCH] added option to specify chinese servers use the `use_china_servers` argument to use the Chinese InControl service API URLs. Fixes #94 --- jlrpy.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jlrpy.py b/jlrpy.py index 476ef7f..b48e3d3 100644 --- a/jlrpy.py +++ b/jlrpy.py @@ -25,7 +25,8 @@ def __init__(self, email='', password='', device_id='', - refresh_token=''): + refresh_token='', + use_china_servers=False): """Init the connection object The email address and password associated with your Jaguar InControl account is required. @@ -34,6 +35,14 @@ def __init__(self, """ self.email = email + if use_china_servers: + global IFAS_BASE_URL + IFAS_BASE_URL = "https://ifas.prod-chn.jlrmotor.com/ifas/jlr" + global IFOP_BASE_ULR + IFOP_BASE_ULR = "https://ifop.prod-chn.jlrmotor.com/ifop/jlr" + global IF9_BASE_URL + IF9_BASE_URL = "https://ifoa.prod-chn.jlrmotor.com/if9/jlr" + if device_id: self.device_id = device_id else: