code formatting

This commit is contained in:
Hugh Rundle 2021-11-16 20:40:22 +11:00
parent 03c59f2431
commit 8658e36ca8
No known key found for this signature in database
GPG Key ID: CD23D6039184286B
1 changed files with 9 additions and 8 deletions

View File

@ -2,6 +2,7 @@
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
import requests import requests
def request_isni_data(search_index, search_term, max_records=5): def request_isni_data(search_index, search_term, max_records=5):
"""Request data from the ISNI API""" """Request data from the ISNI API"""
@ -14,7 +15,7 @@ def request_isni_data(search_index, search_term, max_records=5):
"maximumRecords": max_records, "maximumRecords": max_records,
"startRecord": "1", "startRecord": "1",
"recordPacking": "xml", "recordPacking": "xml",
"sortKeys" : "RLV,pica,0,," "sortKeys": "RLV,pica,0,,",
} }
result = requests.get("http://isni.oclc.org/sru/", params=query_params) result = requests.get("http://isni.oclc.org/sru/", params=query_params)
# the OCLC ISNI server asserts the payload is encoded # the OCLC ISNI server asserts the payload is encoded