This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
66 lines (58 loc) · 2.57 KB
/
README
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
API for simple hotel database
=======================================
Accept next commands:
---------------------------------------
GET /login - check login status
POST /login - login
GET /logout - logout
GET /client - get list of all clients
GET /client?id=<> - get client with target id
POSt /client?first_name_id=<>
&last_name_id=<>
&age=<>
&passport_serial=<>
&passport_number=<> - add new user
POSt /client?id=<>
&first_name_id=<>
&last_name_id=<>
&age=<>
&passport_serial=<>
&passport_number=<> - change user with target id
DELETE /client?id=<> - delete user with target id
GET /rent - get list of all rents
GET /rent?id=<> - get rent with target id
POST /rent?hotel_number=<>
&total_price=<>
&from_date=<>
&to_date=<>
&client_id=<>
&client_id=<>
...
&client_id=<> - add new rent
PUT /rent?id=<>
&hotel_number=<>
&total_price=<>
&from_date=<>
&to_date=<>
&client_id=<>
&client_id=<>
...
&client_id=<> - change target rent
DELETE /rent?id=<> - delete target rent
GET /number - get list of all hotel numbers
GET /number?number=<> - get data of target number
GET /number?state=free - get list of all hotel numbers that are free now
GET /number?state=rented - get list of all hotel numbers that are rented now
(including data of rents and clients)
GET /number?state=free
&at_date=<> - get list of all hotel numbers that are free at target date
GET /number?state=rented
&at_date=<> - get list of all hotel numbers that are free at target date
(including data of rents and clients)
POST /number?number=<>
&price_per_night=<>
&description=<> - add new number
PUT /number?number=<>
&price_per_night=<>
&description=<> - change target number
DELETE /number/number=<> - delete target number