CrossRefOrcid

class pyhelpers.ops.CrossRefOrcid(my_name='', requests_headers=None)[source]

A class to interact with the ORCID Public API and CrossRef API to retrieve metadata about academic publications.

Variables:
  • my_name (str) – My name to be bolded in the author list; defaults to "Fu, Qian".

  • requests_headers (dict) – HTTP headers used for making requests to external APIs; defaults to {"Accept": "application/json"}.

Examples:

>>> from pyhelpers.ops import CrossRefOrcid
>>> co = CrossRefOrcid()
>>> co.ORCID_PUBLIC_API_ENDPOINT
'https://pub.orcid.org/v3.0'
>>> co.CROSSREF_REST_API_ENDPOINT
'https://api.crossref.org/works'
>>> list(co.CITATION_STYLES)
['APA', 'MLA', 'Chicago', 'Harvard', 'IEEE', 'Vancouver']

Attributes

CITATION_STYLES

Templates of various styles of citations.

CROSSREF_REST_API_ENDPOINT

The CrossRef REST API endpoint for querying metadata about published works.

ORCID_PUBLIC_API_ENDPOINT

The ORCID environment for the Public API on the production ORCID Registry.

ZENODO_REST_API_ENDPOINT

The Zenodo REST API endpoint for access to records stored in Zenodo.

Methods

fetch_orcid_works(orcid_id[, work_types, ...])

Fetch recent works from ORCID and enrich with metadata from DOI.

fetch_references(orcid_id[, work_types, ...])

Fetches and formats references from an ORCID profile.

format_references(ref_data[, style])

Formats multiple references in a given citation style.

get_list_of_works(orcid_id)

Fetches a list of works from an ORCID profile.

get_metadata_from_doi(doi)

Fetch full metadata from CrossRef using DOI.

get_orcid_profile(orcid_id[, section, verbose])

Fetches the ORCID profile for a given ORCID ID.

update_references(orcid_id[, work_types, ...])

Updates the "Recent publications" section in a Markdown file with a new list of citations.