MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / verify

Method verify

plugin/bundles/google_search/bundle.py:8–21  ·  view source on GitHub ↗
(self, credentials: BundleCredentials)

Source from the content-addressed store, hash-verified

6
7class GoogleSearch(BundleHandler):
8 async def verify(self, credentials: BundleCredentials):
9
10 query: str = "today's google doodle"
11 api_key: str = credentials.credentials.get("GOOGLE_CUSTOM_SEARCH_API_KEY")
12 engine_id: str = credentials.credentials.get("GOOGLE_CUSTOM_SEARCH_ENGINE_ID")
13
14 url = f"https://www.googleapis.com/customsearch/v1?key={api_key}&cx={engine_id}&q={query}"
15
16 async with ClientSession() as session:
17 async with session.get(url=url, proxy=CONFIG.PROXY) as response:
18 if response.status == 200:
19 pass
20 else:
21 raise_credentials_validation_error()

Callers

nothing calls this directly

Calls 2

getMethod · 0.45

Tested by

no test coverage detected