MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / update_webhook

Method update_webhook

methods/mem0/client/main.py:1000–1011  ·  view source on GitHub ↗
(
        self,
        webhook_id: int,
        name: Optional[str] = None,
        url: Optional[str] = None,
        event_types: Optional[List[str]] = None,
    )

Source from the content-addressed store, hash-verified

998
999 @api_error_handler
1000 async def update_webhook(
1001 self,
1002 webhook_id: int,
1003 name: Optional[str] = None,
1004 url: Optional[str] = None,
1005 event_types: Optional[List[str]] = None,
1006 ) -> Dict[str, Any]:
1007 payload = {k: v for k, v in {"name": name, "url": url, "event_types": event_types}.items() if v is not None}
1008 response = await self.async_client.put(f"api/v1/webhooks/{webhook_id}/", json=payload)
1009 response.raise_for_status()
1010 capture_client_event("async_client.update_webhook", self.sync_client, {"webhook_id": webhook_id})
1011 return response.json()
1012
1013 @api_error_handler
1014 async def delete_webhook(self, webhook_id: int) -> Dict[str, str]:

Callers

nothing calls this directly

Calls 4

capture_client_eventFunction · 0.90
itemsMethod · 0.45
putMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected