Models¶
This page details the various model objects in the Mendeley Python SDK.
User documents¶
Documents¶
- class mendeley.models.documents.UserDocument¶
Base class for user documents.
- id¶
- title¶
- type¶
- source¶
- year¶
- identifiers¶
- keywords¶
- abstract¶
- add_note(text)¶
Adds a note to this document.
Parameters: text – the text of the note to add. Returns: a Annotation.
- attach_file(path)¶
Attaches a file to this document.
Parameters: path – the path of the file to attach. Returns: a File.
a list of Persons.
- created¶
an Arrow object.
- delete()¶
Permanently deletes this document.
- last_modified¶
an Arrow object.
- move_to_trash()¶
Moves this document to the trash.
Returns: a TrashDocument.
- update(**kwargs)¶
Updates this document.
Parameters: kwargs – updated field values. Only the values supplied will be modified. Returns: the updated document.
- class mendeley.models.documents.TrashDocument¶
Base class for trashed documents.
- id¶
- title¶
- type¶
- source¶
- year¶
- identifiers¶
- keywords¶
- abstract¶
a list of Persons.
- created¶
an Arrow object.
- delete()¶
Permanently deletes this document.
- last_modified¶
an Arrow object.
- restore()¶
Restores this document from the trash.
Returns: a UserDocument.
Views¶
The following views are available on UserDocuments and TrashDocuments.
- class mendeley.models.documents.UserBibView¶
Additional fields returned when getting a UserDocument or TrashDocument with view=’bib’ or ‘all’.
- pages¶
- volume¶
- issue¶
- websites¶
- month¶
- publisher¶
- day¶
- city¶
- edition¶
- institution¶
- series¶
- chapter¶
- revision¶
- accessed¶
an Arrow object.
- class mendeley.models.documents.UserClientView¶
Additional fields returned when getting a UserDocument or TrashDocument with view=’client’ or ‘all’.
- file_attached¶
- read¶
- starred¶
- confirmed¶
- class mendeley.models.documents.UserTagsView¶
Additional fields returned when getting a UserDocument or TrashDocument with view=’tags’ or ‘all’.
Catalog documents¶
Documents¶
Views¶
The following views are available on CatalogDocuments.
- class mendeley.models.catalog.CatalogBibView¶
Additional fields returned when getting a CatalogDocument with view=’bib’ or ‘all’.
- pages¶
- volume¶
- issue¶
- websites¶
- month¶
- publisher¶
- day¶
- city¶
- edition¶
- institution¶
- series¶
- chapter¶
- revision¶
- class mendeley.models.catalog.CatalogClientView¶
Additional fields returned when getting a CatalogDocument with view=’client’ or ‘all’.
- file_attached¶
Profiles¶
Groups¶
- class mendeley.models.groups.Group¶
A Mendeley group.
- id¶
- name¶
- description¶
- disciplines¶
- webpage¶
- link¶
- access_level¶
- role¶
- created¶
an Arrow object.
- documents¶
a Documents resource, from which UserDocuments can be retrieved.
- trash¶
a Trash resource, from which TrashDocuments can be retrieved.
- class mendeley.models.groups.GroupMember¶
A member of a Mendeley group.
- id¶
- role¶
- first_name¶
- last_name¶
- display_name¶
- email¶
- link¶
- research_interests¶
- academic_status¶
- verified¶
- user_type¶
- created¶
an Arrow object.
- discipline¶
a Discipline.
- employment¶
a list of Employment objects.
- joined¶
an Arrow object.
Files¶
- class mendeley.models.files.File¶
A file attached to a document.
- id¶
- size¶
- file_name¶
- mime_type¶
- filehash¶
- download_url¶
- add_highlight(bounding_boxes, color)¶
Adds a highlight to this file.
Parameters: - bounding_boxes – the area the highlight covers on the file.
- color – the color of the highlight.
Returns: a Annotation.
- add_sticky_note(text, x_position, y_position, page_number)¶
Adds a sticky note to this file.
Parameters: - text – the text of the sticky_note.
- x_position – the x position on the file of the sticky_note.
- y_position – the y position on the file of the stick_note.
- page_number – the page_number on the file of the sticky_note.
Returns: a Annotation.
- delete()¶
Deletes the file.
- document(view=None)¶
Parameters: view – document view to return. Returns: a UserDocument or CatalogDocument, depending on which the document is attached to.
- download(directory)¶
Downloads the file.
Parameters: directory – the directory to download the file to. This must exist. Returns: the path to the downloaded file.
- download_url¶
the URL at which the file can be downloaded. This is only valid for a short time, so should not be cached.
Annotations¶
- class mendeley.models.annotations.Annotation¶
An annotation attached to a document or a file.
- id¶
- type¶
- text¶
- privacy_level¶
- color¶
a Color.
- created¶
an Arrow object.
- delete()¶
Permanently deletes this annotation.
- document(view=None)¶
Parameters: view – document view to return. Returns: a UserDocument
- last_modified¶
an Arrow object.
- positions¶
a list of BoundingBox.
- update(**kwargs)¶
Updates this annotation.
Common objects¶
- class mendeley.models.common.Education¶
Education details, associated with a Profile.
- institution¶
- degree¶
- website¶
- end_date¶
an Arrow object.
- start_date¶
an Arrow object.
- class mendeley.models.common.Employment¶
Employment details, associated with a Profile.
- institution¶
- position¶
- website¶
- classes¶
- end_date¶
an Arrow object.
- start_date¶
an Arrow object.
- class mendeley.models.common.Location¶
A location, associated with a Profile.
- latitude¶
- longitude¶
- name¶