Added logic to lookup ISBNs.
This commit is contained in:
7
main.py
7
main.py
@@ -19,8 +19,9 @@ def processBook(ISBN):
|
|||||||
if Mode == 1:
|
if Mode == 1:
|
||||||
r = requests.post(URL+'/checkin/', data={'isbn': ISBN, 'locationid': Shelf, 'userid': UserID})
|
r = requests.post(URL+'/checkin/', data={'isbn': ISBN, 'locationid': Shelf, 'userid': UserID})
|
||||||
print(r.text)
|
print(r.text)
|
||||||
|
elif Mode == 3:
|
||||||
|
r = requests.post(URL+'/lookup/', data={'isbn': ISBN})
|
||||||
|
print(r.text)
|
||||||
while True:
|
while True:
|
||||||
var = str(input())
|
var = str(input())
|
||||||
x = var.split('.')
|
x = var.split('.')
|
||||||
@@ -39,6 +40,8 @@ while True:
|
|||||||
elif command == 'UPDATE':
|
elif command == 'UPDATE':
|
||||||
os.system('cd ~/libraryClient')
|
os.system('cd ~/libraryClient')
|
||||||
os.system('git pull')
|
os.system('git pull')
|
||||||
|
elif command == 'LU':
|
||||||
|
Mode=3
|
||||||
elif command == '':
|
elif command == '':
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user