In [19]:
from mendeley import Mendeley

from local import secret, client_id

In [20]:
url = 'https://api.mendeley.com:443/documents'

In [21]:
mendeley = Mendeley(client_id, secret)
session = mendeley.start_client_credentials_flow().authenticate()

In [22]:
doi = '10.2108/zsj.12.655'

In [23]:
doc = session.catalog.by_identifier(doi=doi, view='stats')
print '"%s" has %s readers.' % (doc.title, doc.reader_count)


"Two Japanese wildcats, the Tsushima cat and the Iriomote cat, show the same Mitochondrial DNA lineage as the leopard cat Felis bengalensis" has 92 readers.

In [24]:
person = doc.authors[0]

In [25]:
person.fields()


Out[25]:
['first_name', 'last_name']

In [52]:
advanced = session.catalog.advanced_search(title='*', view='all', min_year=2015, max_year=2015)

In [53]:
all_results = advanced.list()

In [58]:
all_results.count


Out[58]:
556914

In [54]:
one_doc = all_results.items[0]

In [60]:
one_doc.title


Out[60]:
u'The Suffocation Model: Why Marriage in America Is Becoming an All-or-Nothing Institution'

In [62]:
one_doc.year


Out[62]:
2015

In [68]:
a_person = one_doc.authors[0]

In [71]:
a_person.fields()


Out[71]:
['first_name', 'last_name']

In [67]:
one_doc.link


Out[67]:
u'http://www.mendeley.com/research/suffocation-model-marriage-america-becoming-allornothing-institution'

In [ ]: