(self, credentials: BundleCredentials)
| 6 | |
| 7 | class Youtube(BundleHandler): |
| 8 | async def verify(self, credentials: BundleCredentials): |
| 9 | query: str = 'taskingai' |
| 10 | GOOGLE_API_KEY: str = credentials.credentials.get("GOOGLE_API_KEY") |
| 11 | |
| 12 | url = f"https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=1&q={query}&key={GOOGLE_API_KEY}" |
| 13 | |
| 14 | async with aiohttp.ClientSession() as session: |
| 15 | async with session.get(url, proxy=CONFIG.PROXY) as response: |
| 16 | if response.status == 200: |
| 17 | pass |
| 18 | else: |
| 19 | raise_credentials_validation_error() |
nothing calls this directly
no test coverage detected