| 14 | |
| 15 | class CalendarHttp(GAPI): |
| 16 | def __init__(self, creds: GHuntCreds, headers: Dict[str, str] = {}): |
| 17 | super().__init__() |
| 18 | |
| 19 | if not headers: |
| 20 | headers = gb.config.headers |
| 21 | |
| 22 | base_headers = {} |
| 23 | |
| 24 | headers = {**headers, **base_headers} |
| 25 | |
| 26 | self.hostname = "clients6.google.com" |
| 27 | self.scheme = "https" |
| 28 | |
| 29 | self.authentication_mode = "sapisidhash" # sapisidhash, cookies_only, oauth or None |
| 30 | self.require_key = "calendar" # key name, or None |
| 31 | |
| 32 | self._load_api(creds, headers) |
| 33 | |
| 34 | async def get_calendar(self, as_client: httpx.AsyncClient, calendar_id: str) -> Tuple[bool, Calendar]: |
| 35 | endpoint_name = inspect.currentframe().f_code.co_name |