How to use the habanero.cnrequest.CNRequest function in habanero

To help you get started, we’ve selected a few habanero examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sckott / habanero / habanero / cn / cn.py View on Github external
cn.content_negotiation(ids = "10.15468/t4rau8", format = "ris")
        cn.content_negotiation(ids = "10.15468/t4rau8", format = "bibtex")
        cn.content_negotiation(ids = "10.15468/t4rau8", format = "bibentry")
        cn.content_negotiation(ids = "10.15468/t4rau8", format = "bibtex")

        # many DOIs
        dois = ['10.5167/UZH-30455','10.5167/UZH-49216','10.5167/UZH-503', '10.5167/UZH-38402','10.5167/UZH-41217']
        x = cn.content_negotiation(ids = dois)

        # Use a different base url
        url = "http://dx.doi.org"
        cn.content_negotiation(ids = "10.1126/science.169.3946.635", url = url)
    '''
    if url is None:
        url = cn_base_url
    return CNRequest(url, ids, format, style, locale, **kwargs)