Spaces:
Sleeping
Sleeping
Delete api_docs.py
Browse files- api_docs.py +0 -61
api_docs.py
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
### api_docs.py
|
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 the booking."
|
16 |
-
}
|
17 |
-
}
|
18 |
-
}
|
19 |
-
}
|
20 |
-
},
|
21 |
-
"headers": {
|
22 |
-
"Authorization": "Bearer <auth_token>",
|
23 |
-
"Content-Type": "application/json"
|
24 |
-
},
|
25 |
-
"response": {
|
26 |
-
"description": "A JSON object containing booking details for a specific booking id.",
|
27 |
-
"content_type": "application/json",
|
28 |
-
"fields": {
|
29 |
-
"booking_id": "The unique identifier for the booking.",
|
30 |
-
"full_name": "The full name of the customer associated with the booking.",
|
31 |
-
"amount": "The total amount for the booking (integer).",
|
32 |
-
"checkin": "The check-in date for the booking (ISO 8601 format).",
|
33 |
-
"checkout": "The check-out date for the booking (ISO 8601 format).",
|
34 |
-
"address": "The address associated with the booking.",
|
35 |
-
"user_id": "The user ID associated with the booking (integer).",
|
36 |
-
"infotext": "Additional information related to the booking.",
|
37 |
-
"included": "Details of services included in the booking."
|
38 |
-
}
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
|
43 |
-
# --actual response handling with .get() and mapping entries methods are request handling code, not in here (API documentation).
|
44 |
-
#"response": {
|
45 |
-
#"description": "A JSON object containing booking details for a specific booking ID.",
|
46 |
-
#"content_type": "application/json",
|
47 |
-
#"booking_info": {
|
48 |
-
#"booking_id": {"description": "The unique identifier for the booking.", "mapping": "response.get('booking_id', 'N/A')"},
|
49 |
-
#"full_name": {"description": "The full name of the customer associated with the booking.", "mapping": "response.get('full_name', 'N/A')"},
|
50 |
-
#"amount": {"description": "The total amount for the booking (integer).", "mapping": "response.get('amount', 0)"},
|
51 |
-
#"checkin": {"description": "The check-in date for the booking (ISO 8601).", "mapping": "response.get('checkin', 'N/A')"}, # --datetime format is 2024-12-20T15:00:00
|
52 |
-
#"checkout": {"description": "The check-out date for the booking (ISO 8601).", "mapping": "response.get('checkout', 'N/A')"},
|
53 |
-
#"address": {"description": "The address associated with the booking.", "mapping": "response.get('address', 'N/A')"},
|
54 |
-
#"user_id": {"description": "The user ID associated with the booking (integer).", "mapping": "response.get('user_id', 0)"},
|
55 |
-
#"infotext": {"description": "Additional information related to the booking.", "mapping": "response.get('infotext', 'N/A')"},
|
56 |
-
#"included": {"description": "Details of services included in the booking.", "mapping": "response.get('included', 'N/A')"}
|
57 |
-
#}
|
58 |
-
#}
|
59 |
-
|
60 |
-
api_docs_str = json.dumps(api_docs, indent=2)
|
61 |
-
api_docs_str
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|