We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 459c527 + 8125e3a commit 2774a9dCopy full SHA for 2774a9d
1 file changed
comwatt_client/client.py
@@ -14,8 +14,14 @@ class ComwattClient:
14
session (requests.Session): The session object for making HTTP requests.
15
16
"""
17
- def __init__(self):
18
- self.base_url = 'https://energy.comwatt.com/api'
+
+ API_ENDPOINTS = {
19
+ 'energy': 'https://energy.comwatt.com/api',
20
+ 'go': 'https://go.comwatt.com/api'
21
+ }
22
23
+ def __init__(self, api = 'energy'):
24
+ self.base_url = self.API_ENDPOINTS[api]
25
self.session = requests.Session()
26
27
def authenticate(self, username, password):
0 commit comments