camparchimedes
commited on
Update api_docs_mck.py
Browse files- api_docs_mck.py +1 -22
api_docs_mck.py
CHANGED
@@ -5,7 +5,7 @@ import json
|
|
5 |
daysoff_api_docs = {
|
6 |
"base_url": "https://670dccd0073307b4ee447f2f.mockapi.io/daysoff/api/V1/booking",
|
7 |
"endpoints": {
|
8 |
-
"method": "
|
9 |
"description": "Retrieve booking information for a given booking ID.",
|
10 |
"parameters": {
|
11 |
"booking_id": {
|
@@ -31,25 +31,4 @@ daysoff_api_docs = {
|
|
31 |
}
|
32 |
}
|
33 |
|
34 |
-
# --json decode fu.
|
35 |
-
def decode_booking_info(response):
|
36 |
-
booking_info = {
|
37 |
-
"booking_id": response.get("booking_id", "N/A"),
|
38 |
-
"full_name": response.get("full_name", "N/A"),
|
39 |
-
"amount": response.get("amount", "N/A"),
|
40 |
-
"date": response.get("date", "N/A"),
|
41 |
-
"address": response.get("address", "N/A"),
|
42 |
-
"user_id": response.get("user_id", "N/A")
|
43 |
-
}
|
44 |
-
|
45 |
-
json_decode = (
|
46 |
-
f"Booking ID: {booking_info['booking_id']}\n"
|
47 |
-
f"Full Name: {booking_info['full_name']}\n"
|
48 |
-
f"Amount: {booking_info['amount']}\n"
|
49 |
-
f"Date: {booking_info['date']}\n"
|
50 |
-
f"Address: {booking_info['address']}\n"
|
51 |
-
f"User ID: {booking_info['user_id']}"
|
52 |
-
)
|
53 |
-
|
54 |
-
return json_decode
|
55 |
|
|
|
5 |
daysoff_api_docs = {
|
6 |
"base_url": "https://670dccd0073307b4ee447f2f.mockapi.io/daysoff/api/V1/booking",
|
7 |
"endpoints": {
|
8 |
+
"method": "GET",
|
9 |
"description": "Retrieve booking information for a given booking ID.",
|
10 |
"parameters": {
|
11 |
"booking_id": {
|
|
|
31 |
}
|
32 |
}
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|