Exemple #1
0
 def get_book_availability(self, id_type, ids):
     return (
         lending.get_availability_of_works(ids) if id_type == "openlibrary_work"
         else
         lending.get_availability_of_editions(ids) if id_type == "openlibrary_edition"
         else
         lending.get_availability_of_ocaids(ids) if id_type == "identifier"
         else []
     )
Exemple #2
0
 def get_book_availability(self, id_type, ids):
     return (
         lending.get_availability_of_works(ids) if id_type == "openlibrary_work"
         else
         lending.get_availability_of_editions(ids) if id_type == "openlibrary_edition"
         else
         lending.get_availability_of_ocaids(ids) if id_type == "identifier"
         else []
     )