Understand the elsapy data model and core classes
masterThe elsapy module is organized around several key classes that map to Elsevier's data model:
Client and Search
ElsClient: The primary interface for interacting withapi.elsevier.com.ElsSearch: Represents a search through an index (Document, Author, or Affiliation). After execution, results are stored in the.resultsattribute as a list of dictionaries.
Entities (ElsEntity)
ElsEntity is an abstract class representing an entity in the Scopus data model. Entities can be initialized with a URI and then read from the API using an ElsClient. Once read, the object's data is accessible via the .data attribute (a JSON/dictionary representation).
Document Types
AbsDoc: Represents a Scopus document (abstract only), typically a scholarly article record.FullDoc: Represents a ScienceDirect document (full text), such as a scholarly article or book chapter.
Profiled Entities (elsProf)
elsProf is an abstract class for profiled entities in Scopus, with two main descendants:
ElsAuthor: Represents a Scopus author.ElsAffil: Represents a Scopus affiliation (institution).
Note for Authors and Affiliations: Both ElsAuthor and ElsAffil provide a .readDocs() method. This retrieves all publications associated with that entity and stores them in a .doc_list attribute as a list of metadata dictionaries.