← Về thư mục
scripts/openalex_client.py
- _require_api_url · function · L56-L64 — def _require_api_url(url: str) -> None
- _daily_budget_exhausted · function · L67-L81 — def _daily_budget_exhausted(headers: Any) -> bool
- OpenAlexUnavailable · class · L84-L85 — class OpenAlexUnavailable(Exception)
- OpenAlexClient · class · L88-L230 — class OpenAlexClient
- init · method · L95-L110 — def init( self, polite_email: str | None = None, api_key: str | None = None, ): # api_key is the OpenAlex-documented auth mechanism (free key, 10× # the keyless daily budget). polite_email predates it: the polite # pool is no longer in OpenAlex's docs but
mailto is still sent # for backward compatibility when configured. Either credential # selects the authenticated pacing tier.
- _throttle · method · L112-L121 — def _throttle(self) -> None
- _get · method · L123-L186 — def _get(self, path: str, query: Mapping[str, str]) -> dict[str, Any]
- doi_lookup_with_title_check · method · L188-L197 — def doi_lookup_with_title_check( self, doi: str, expected_title: str, ) -> dict[str, Any] | None
- title_search · method · L199-L230 — def title_search(self, title: str, year: int | None = None) -> dict[str, Any] | None