@@ -73,6 +73,7 @@ class OverkizClient(ABC):
7373 setup : Setup | None = field (default = None , init = False )
7474 devices : list [Device ] = field (factory = list , init = False )
7575 gateways : list [Gateway ] = field (factory = list , init = False )
76+ _ssl : bool = field (default = True , init = False )
7677
7778 @abstractmethod
7879 async def _login (
@@ -99,12 +100,11 @@ def _headers(self) -> dict[str, str]:
99100 async def get (
100101 self ,
101102 path : str ,
102- ssl : bool = True ,
103103 ) -> Any :
104104 """Make a GET request to the OverKiz API"""
105105
106106 async with self .session .get (
107- f"{ self .endpoint } { path } " , headers = self ._headers , ssl = ssl
107+ f"{ self .endpoint } { path } " , headers = self ._headers , ssl = self . _ssl
108108 ) as response :
109109 await self .check_response (response )
110110 return await response .json ()
@@ -114,7 +114,6 @@ async def post(
114114 path : str ,
115115 payload : JSON | None = None ,
116116 data : JSON | None = None ,
117- ssl : bool = True ,
118117 ) -> Any :
119118 """Make a POST request to the OverKiz API"""
120119
@@ -123,20 +122,19 @@ async def post(
123122 data = data ,
124123 json = payload ,
125124 headers = self ._headers ,
126- ssl = ssl ,
125+ ssl = self . _ssl ,
127126 ) as response :
128127 await self .check_response (response )
129128 return await response .json ()
130129
131130 async def delete (
132131 self ,
133132 path : str ,
134- ssl : bool = True ,
135133 ) -> None :
136134 """Make a DELETE request to the OverKiz API"""
137135
138136 async with self .session .delete (
139- f"{ self .endpoint } { path } " , headers = self ._headers , ssl = ssl
137+ f"{ self .endpoint } { path } " , headers = self ._headers , ssl = self . _ssl
140138 ) as response :
141139 await self .check_response (response )
142140
0 commit comments