(self, endpoint, *args, **kwargs)
| 22 | self._method = getattr(parent._session, http_method) |
| 23 | |
| 24 | def __call__(self, endpoint, *args, **kwargs): # full signature passed here |
| 25 | response = self._method( |
| 26 | urljoin(self._parent.base_url, endpoint), *args, **kwargs |
| 27 | ) |
| 28 | # unpack |
| 29 | if response.headers.get("content-type", "").startswith("application/json"): |
| 30 | return response.json(), response.status_code |
| 31 | else: |
| 32 | return response.content, response.status_code |
| 33 | |
| 34 | |
| 35 | class CDGClient: |
nothing calls this directly
no outgoing calls
no test coverage detected