Update api_docs.py
Browse files- api_docs.py +4 -7
api_docs.py
CHANGED
@@ -2,19 +2,16 @@
|
|
2 |
|
3 |
import json
|
4 |
|
5 |
-
# python dict.
|
6 |
api_docs = {
|
7 |
"base_url": "https://aivisions.no/data/daysoff/api/v1/booking/",
|
8 |
"endpoints": {
|
9 |
"/": {
|
10 |
"method": "POST",
|
11 |
"description": "Retrieve booking information associated with a booking ID.",
|
12 |
-
#"parameters": None
|
13 |
"parameters": {
|
14 |
"body": {
|
15 |
"booking_id": {
|
16 |
"type": "string",
|
17 |
-
#"required": true,
|
18 |
"description": "The unique identifier for a booking."
|
19 |
}
|
20 |
}
|
@@ -26,14 +23,13 @@ api_docs = {
|
|
26 |
"Content-Type": "application/json"
|
27 |
},
|
28 |
"response": {
|
29 |
-
"description": "A JSON object containing booking details for a specific booking
|
30 |
-
"content_type": "application/json",
|
31 |
"fields": {
|
32 |
"booking_id": "The unique identifier for the booking.",
|
33 |
"full_name": "The full name of the customer associated with the booking.",
|
34 |
"amount": "The total amount for the booking (integer).",
|
35 |
-
"checkin": "The check-in date for the booking.", # --datetime format is 2024-12-20T15:00:00
|
36 |
-
"checkout": "The check-out date for the booking.",
|
37 |
"address": "The address associated with the booking.",
|
38 |
"user_id": "The user ID associated with the booking (integer).",
|
39 |
"infotext": "Additional information related to the booking.",
|
@@ -42,5 +38,6 @@ api_docs = {
|
|
42 |
}
|
43 |
}
|
44 |
|
|
|
45 |
api_docs_str = json.dumps(api_docs, indent=2)
|
46 |
api_docs_str
|
|
|
2 |
|
3 |
import json
|
4 |
|
|
|
5 |
api_docs = {
|
6 |
"base_url": "https://aivisions.no/data/daysoff/api/v1/booking/",
|
7 |
"endpoints": {
|
8 |
"/": {
|
9 |
"method": "POST",
|
10 |
"description": "Retrieve booking information associated with a booking ID.",
|
|
|
11 |
"parameters": {
|
12 |
"body": {
|
13 |
"booking_id": {
|
14 |
"type": "string",
|
|
|
15 |
"description": "The unique identifier for a booking."
|
16 |
}
|
17 |
}
|
|
|
23 |
"Content-Type": "application/json"
|
24 |
},
|
25 |
"response": {
|
26 |
+
"description": "A JSON object containing booking details for a specific booking ID.",
|
|
|
27 |
"fields": {
|
28 |
"booking_id": "The unique identifier for the booking.",
|
29 |
"full_name": "The full name of the customer associated with the booking.",
|
30 |
"amount": "The total amount for the booking (integer).",
|
31 |
+
"checkin": "The check-in date for the booking (ISO 8601).", # --datetime format is 2024-12-20T15:00:00
|
32 |
+
"checkout": "The check-out date for the booking (ISO 8601).",
|
33 |
"address": "The address associated with the booking.",
|
34 |
"user_id": "The user ID associated with the booking (integer).",
|
35 |
"infotext": "Additional information related to the booking.",
|
|
|
38 |
}
|
39 |
}
|
40 |
|
41 |
+
|
42 |
api_docs_str = json.dumps(api_docs, indent=2)
|
43 |
api_docs_str
|