-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAPI_Documentation.txt
106 lines (99 loc) · 2.74 KB
/
API_Documentation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
'url': 'http://localhost:8080/student/signup' ,
'method': 'POST',
'description': 'creates a new user' ,
'body': {
"studentName": "Hritish" ,
"contact": "7288954026" ,
"bitsID": "2019A3PS0356H" ,
"username": "starks-and-wolves" ,
"email": "f20190356@hyderabad.bits-pilani.ac.in" ,
"password": "123456" ,
"wishList": [],
"booksIssued": [],
"booksrequested": [],
booksLent: [],
},
}
{
'url': 'http://localhost:3000/student/book' ,
'method': 'POST',
'description': 'adds a new book' ,
'assumptions': 'user adding the book has to be manually input'
'body': {
"bookName": "Vahana Masterclass" ,
"authorName": "Alfredo Covelli" ,
"ISBN": "dlnvednnvele" ,
"edition": 1 ,
"yearOfPublishing": "2003" ,
"bookOwner": "62526528306b1f3e200e4076" ,
"publishedBy": "Oxford Pub" ,
"currentlyWith": "62526528306b1f3e200e4076" ,
"previousHolders": [],
"review":[{
"message": "great Book" ,
"givenBy": "62526528306b1f3e200e4076"
}],
"genre": "Horror" ,
"bookRequests": []
}
}
{
'url': 'http://localhost:3000/student/bookRequest' ,
'method': 'POST',
'description': 'creates a book request' ,
'body': {
"bookRequested" : "625275c2e2a3d5a2c715f718" ,
SenderID: "62526528306b1f3e200e4076",
receiverID: "625273a2e2a3d5a2c715f715" ,
"noOfDays": 10,
},
}
{
'url': 'http://localhost:3000/student/returnBook' ,
'method': 'POST',
'description': 'returns an issued book' ,
'body': {
"id": "625457c501a228e261f43d62",
"transactionId": "62552303accfe3c36b4f6bac"
},
}
{
'url': 'http://localhost:3000/student/approveBookRequest' ,
'method': 'POST',
'description': 'creates a book request' ,
'body': {
"id": "625273a2e2a3d5a2c715f715",
"date": "2022-04-14T13:49:12.792+00:00",
"PlaceOfExchange": "V-333"
},
}
{
'url': 'http://localhost:3000/student/approvedBook/extension' ,
'method': 'POST',
'description': 'creates an extension request' ,
'body': {
"id": "625273a2e2a3d5a2c715f715",
"daysExtensionRequested": 5,
"transactionId": "",
"newPlaceOfExchange": "V-335"
},
}
{
'url': 'http://localhost:3000/student/payPenalty' ,
'method': 'POST',
'description': 'pay book penalty' ,
'body': {
"id": "625273a2e2a3d5a2c715f715",
"transactionID": ""
},
}
{
'url': 'http://localhost:3000/student/payPenalty' ,
'method': 'POST',
'description': 'pay book penalty' ,
'body': {
"id": "625273a2e2a3d5a2c715f715",
"transactionID": ""
},
}