Base
papertrail.fetchers.base
Abstract base class for publication fetchers.
BaseFetcher
Bases: ABC
Interface that all data-source fetchers must implement.
Subclass this to add support for additional bibliographic APIs (e.g. Semantic Scholar, Crossref, PubMed).
Source code in src/papertrail/fetchers/base.py
search_authors
abstractmethod
Search for authors matching the given name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Full or partial author name. |
required |
Returns:
| Type | Description |
|---|---|
list[AuthorInfo]
|
A list of matching :class: |
list[AuthorInfo]
|
ordered by relevance (most relevant first). |
Raises:
| Type | Description |
|---|---|
FetchError
|
If the underlying API request fails. |
Source code in src/papertrail/fetchers/base.py
fetch_publications
abstractmethod
Fetch all publications for a specific author.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
author_id
|
str
|
The unique author identifier understood by this fetcher. |
required |
max_results
|
int | None
|
Optional cap on the number of publications returned.
|
None
|
Returns:
| Type | Description |
|---|---|
list[Publication]
|
A list of :class: |
Raises:
| Type | Description |
|---|---|
FetchError
|
If the underlying API request fails. |
Source code in src/papertrail/fetchers/base.py
fetch_analyze_metrics
Fetch optional source-native analysis metrics for publications.
Most fetchers will return None. Data sources that provide native
analysis endpoints (e.g. ADS Metrics API) can override this hook.