def get(self, path, **kwargs) -> dict: """ Args: path: **kwargs: """ with handler_request(self, LOGGER): url = self.base_url + path response = self.request.get(url, **kwargs) if not response.ok: raise handler_request_exception(response) return response.json()
def delete(self, path: str, **kwargs) -> Union[bool, dict]: """ Args: path (str): **kwargs: """ with handler_request(self, LOGGER): url = self.base_url + path response = self.request.delete(url, **kwargs) if not response.ok: raise handler_request_exception(response) return True
def _handler_request(self): return handler_request(self, LOGGER)