ORCID / python-orcid

Python wrapper around ORCID API
BSD 3-Clause "New" or "Revised" License
91 stars 26 forks source link

versions as arguments #29

Open lizgzil opened 4 years ago

lizgzil commented 4 years ago

It'd be nice to have the version parameters as arguments to the PublicAPI class in orcid.py. At the moment I can't use your code since SEARCH_VERSION is hard coded in (I wanted to use SEARCH_VERSION="/v3.0"). e.g.

class PublicAPI(object):
    """Public API."""

    TYPES_WITH_PUTCODES = set(['address',
                               'education',
                               'email',
                               'employment',
                               'external-identifier',
                               'funding',
                               'keywords',
                               'other-names',
                               'peer-review',
                               'researcher-urls',
                               'work'])

    TYPES_WITH_MULTIPLE_PUTCODES = set(['works'])

    def __init__(self, institution_key, institution_secret, sandbox=False,
                 timeout=None, do_store_raw_response=False, search_version="/v2.0"):