Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def query(words):
"""Query the Google Books (JSON API v1) for metadata."""
data = wquery(SERVICE_URL.format(words=words.replace(' ', '+')), UA)
return _records(words, data)
def query(isbn):
"""Query the worldcat.org service for metadata."""
data = wquery(SERVICE_URL.format(isbn=isbn), UA)
return _records(isbn, data)
def query(isbn):
"""Query the openlibrary.org service for metadata."""
data = wquery(SERVICE_URL.format(isbn=isbn), UA)
return _records(isbn, data)
def query(isbn):
"""Query the Google Books (JSON API v1) service for metadata."""
data = wquery(SERVICE_URL.format(isbn=isbn), UA)
return _records(isbn, data)
def query(isbn):
"""Query the worldcat.org service for related ISBNs."""
data = wquery(SERVICE_URL.format(isbn=isbn), UA, parser=literal_eval)
return _editions(isbn, data)
def query(isbn):
"""Query the isbndb.org service for metadata."""
if not apikeys.get('isbndb'):
raise NoAPIKeyError
data = wquery(SERVICE_URL.format(apikey=apikeys['isbndb'], isbn=isbn), UA)
return _records(isbn, data)