corvix.ingestion¶
GitHub notifications ingestion client.
Attributes¶
Classes¶
Resolve web URLs for notifications where the fast path returned None. |
|
Client for GitHub notifications API. |
Functions¶
|
Return value as a JSON object when it is a dict. |
|
|
|
Enrich web_url in-place for notifications where the fast path returned None. |
|
|
|
Module Contents¶
- corvix.ingestion._as_json_object(value: corvix.types.JsonValue) corvix.types.JsonObject | None[source][source]¶
Return value as a JSON object when it is a dict.
- corvix.ingestion._coerce_json_value(value: object) corvix.types.JsonValue[source][source]¶
- class corvix.ingestion.WebUrlEnricher[source][source]¶
Bases:
ProtocolResolve web URLs for notifications where the fast path returned None.
- corvix.ingestion.resolve_web_urls(notifications: list[corvix.domain.Notification], enricher: WebUrlEnricher | None = None) None[source][source]¶
Enrich web_url in-place for notifications where the fast path returned None.
- class corvix.ingestion.GitHubNotificationsClient[source][source]¶
Client for GitHub notifications API.
- fetch_notifications(polling: corvix.config.PollingConfig) list[corvix.domain.Notification][source][source]¶
Fetch notifications with pagination.
- _fetch_page(polling: corvix.config.PollingConfig, page: int) list[corvix.types.JsonObject][source][source]¶
- dismiss_thread(thread_id: str) None[source][source]¶
Dismiss a notification thread (removes it from inbox permanently).
- enrich_web_url(notification: corvix.domain.Notification) str | None[source][source]¶
Resolve a browser URL via API for notification types the fast path cannot handle.
- fetch_json_url(url: str, timeout_seconds: float = 30.0) corvix.types.JsonValue[source][source]¶
Fetch JSON from a fully-qualified API URL with host validation.
- _request_json(url: str, method: str, timeout_seconds: float = 30.0) corvix.types.JsonValue[source][source]¶
- corvix.ingestion._http_error_detail(error: urllib.error.HTTPError) str[source][source]¶