Usage¶
API Connector to the Ghent University Academic Bibliography
All of the calls return (lists) with named tuples. This means that you can access the data with a.dot.notation instead of the regular[“dict”][“notation”]. Note that the API does not return empty values as empty placeholders.
publication = single_publication(7175390)
try:
print publication.cite.chicago_author_date
except AttributeError:
print 'No chicago author date is provided'
-
biblio.
search
(query=None)¶ Search the Biblio Api for publications having a certain keyword.
- Args:
- query (str): the keyword that needs to be searched
- Returns:
- A list with named tuples of all the publications that match the query When no publications are found, an empty list is returned.
-
biblio.
single_publication
(publication_id)¶ Get a single publication as a named tuple
- Args:
- publication_id (int): The numerical id, of the wanted publication
- Returns:
- A named tuple if a publication is found, None when nothing is found.
-
biblio.
publications_by_person
(ugent_id)¶ Get all the publications of a person
- Args:
- ugent_id (str): The numerical ugent_id of the person
- Returns:
- A list with named tuples of all the publications of the given person. If no person or publications are found, an empty list is returned.
-
biblio.
publications_by_group
(ugent_ids)¶ Get all the publications of an group of people
- Args:
- ugent_ids (list): A list of integers
- Returns:
- A list with named tuples of all the publications that share the group of people If no person or publications are found, an empty list is returned.
-
biblio.
publications_by_organisation
(organisation_id, year=None)¶ Get all the publications of an organisation
- Args:
- organisation_id (str): The id of the organisation. year (int): The year of publication. When omitted, all the publications are returned
- Returns:
- A list with named tuples of all the publications of the given organisation. If no organisation is found, None is returned. If no publication is found, an empty list is returned
-
biblio.
publications_by_project
(project_id)¶ Get all the publications of a project
- Args:
- project_id (str): The id of the project
- Returns:
- A list with named tuples of all the publications that belong to the given project. When no project or publications are found, an empty list is returned.