From bd149dc7e56f4d313f85e470c73f16aabfe6e2ca Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 12 Jun 2021 14:15:31 -0400 Subject: [PATCH] Added logic to lookup ISBNs. --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index bd0ff0b..b9b29c7 100644 --- a/main.py +++ b/main.py @@ -19,8 +19,9 @@ def processBook(ISBN): if Mode == 1: r = requests.post(URL+'/checkin/', data={'isbn': ISBN, 'locationid': Shelf, 'userid': UserID}) print(r.text) - - + elif Mode == 3: + r = requests.post(URL+'/lookup/', data={'isbn': ISBN}) + print(r.text) while True: var = str(input()) x = var.split('.') @@ -39,6 +40,8 @@ while True: elif command == 'UPDATE': os.system('cd ~/libraryClient') os.system('git pull') + elif command == 'LU': + Mode=3 elif command == '': pass else: