
GOOD_HTTP_CODES = [200, 201, 202, 203]
ERROR_CODE_FIELD = 'errcode'
MENSSAGE_FIELD = 'errmsg'
LIST_FIELD = 'list'
STATE_FIELD = 'state'
PAGES_FIELD = 'pages'
ELECTRIC_QUANTITY_FIELD = 'electricQuantity'
API_URI='https://api.ttlock.com/v3'
GATEWAY_LIST_RESOURCE = 'gateway/list'
LOCKS_PER_GATEWAY_RESOURCE = 'gateway/listLock'
LOCK_RECORDS_RESOURCE = 'lockRecord/list'
LOCK_STATE_RESOURCE = 'lock/queryOpenState'
LOCK_ELECTRIC_QUANTITY_RESOURCE='lock/queryElectricQuantity'
GATEWAY_LIST_URL = '{}/{}?clientId={}&accessToken={}&pageNo={}&pageSize={}&date={}'
LOCKS_PER_GATEWAY_URL = '{}/{}?clientId={}&accessToken={}&gatewayId={}&date={}'
LOCK_RECORDS_URL = '{}/{}?clientId={}&accessToken={}&lockId={}&pageNo={}&pageSize={}&startDate={}&endDate={}&date={}'
LOCK_QUERY_URL = '{}/{}?clientId={}&accessToken={}&lockId={}&date={}'