Skip to content

Commit

Permalink
jvbk
Browse files Browse the repository at this point in the history
  • Loading branch information
xerxes87 committed Aug 8, 2019
1 parent 637ee1d commit 7d2e20c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyfujitseu/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def __init__(self,username,password,region='us',tokenpath='token.txt'):
API_BASE_URL = "https://ads-field-eu.aylanetworks.com/apiv1/"
elif region == 'cn':
self._SIGNIN_BODY = '{"user":{"email":"%s","password":"%s","application":{"app_id":"FGLairField-cn-id","app_secret":"FGLairField-cn-zezg7Y60YpAvy3HPwxvWLnd4Oh4"}}}'
self._API_GET_ACCESS_TOKEN_URL = "https://user-field-eu.aylanetworks.com/users/sign_in.json"
API_BASE_URL = "https://ads-field-eu.aylanetworks.com/apiv1/"
else:
self._SIGNIN_BODY = "{\r\n \"user\": {\r\n \"email\": \"%s\",\r\n \"application\": {\r\n \"app_id\": \"CJIOSP-id\",\r\n \"app_secret\": \"CJIOSP-Vb8MQL_lFiYQ7DKjN0eCFXznKZE\"\r\n },\r\n \"password\": \"%s\"\r\n }\r\n}"
self._API_GET_ACCESS_TOKEN_URL = "https://user-field.ayla.com.cn/users/sign_in.json"
API_BASE_URL = "https://ads-field.ayla.com.cn/apiv1/"
else:
self._SIGNIN_BODY = "{\r\n \"user\": {\r\n \"email\": \"%s\",\r\n \"application\": {\r\n \"app_id\": \"CJIOSP-id\",\r\n \"app_secret\": \"CJIOSP-Vb8MQL_lFiYQ7DKjN0eCFXznKZE\"\r\n },\r\n \"password\": \"%s\"\r\n }\r\n}"
self._API_GET_ACCESS_TOKEN_URL = "https://user-field.aylanetworks.com/users/sign_in.json"
API_BASE_URL = "https://ads-field.aylanetworks.com/apiv1/"

self._API_GET_PROPERTIES_URL = API_BASE_URL + "dsns/{DSN}/properties.json"
self._API_SET_PROPERTIES_URL = API_BASE_URL + "properties/{property}/datapoints.json"
Expand Down

0 comments on commit 7d2e20c

Please sign in to comment.