示例#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 []
     )
示例#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 []
     )