Mendeley / mendeley-python-sdk

Python SDK for the Mendeley API.
Apache License 2.0
119 stars 59 forks source link

Get author profiles of a document #17

Open PBrockmann opened 8 years ago

PBrockmann commented 8 years ago

Working on a biblio data viz from Mendeley database... Is there a way to retrieve author profiles of a document ? For now, I have only been able to retrieve authors (list of persons) but not their profiles. That would be a valuable source of informations to get their institute, their country.

Here is my snippet of code:

# "name": "Ocean Acidification (OA-ICC)"
id = "8ffa1079-1e16-30d0-80f3-e0808fa1e017"

group = session.groups.get(id)
d=group.documents.get("00ba8a9e-4536-3355-a3e1-ba1cf1e4afa3") 
for person in d.authors:
        print person.last_name, person.first_name

gives:

Thomsen J
Casties I
Pansch C
Körtzinger A
Melzner F
10.1594/PANGAEA.829723 None

Notice the last one that is indicated as a person whereas it is a DOI. Perhaps a lack of checking when the input has been done. Get the profiles of the authors would help to filter such a case.