Spaces:
Sleeping
Sleeping
File size: 2,405 Bytes
daf2ab5 a6e4abe 555d347 2d2333e daf2ab5 2d2333e a6e4abe f963e32 2d2333e a6e4abe 2d2333e f963e32 2d2333e 2d8ef09 a6e4abe daf2ab5 2d2333e a6e4abe f963e32 a6e4abe f963e32 2d8ef09 a6e4abe daf2ab5 2d2333e a6e4abe f963e32 a6e4abe f963e32 a6e4abe f963e32 2d8ef09 a6e4abe 2d8ef09 daf2ab5 a6e4abe 555d347 2d2333e |
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 |
import json
# API Documentation
api_docs = {
"base_url": "https://670dccd0073307b4ee447f2f.mockapi.io/daysoff/api/V1",
"endpoints": {
"/booking": {
"method": "GET",
"description": "Retrieve booking information associated with a specific booking ID.",
"parameters": None,
"headers": {
"Content-Type": "application/json"
},
"response": {
"description": "The booking information associated with a specific booking ID.",
"content_type": "application/json",
"fields": {
"booking_id": "response.get('booking_id', 'N/A')",
"full_name": "response.get('full_name', 'N/A')",
"amount": "response.get('amount', 'N/A')",
"checkin": "response.get('checkin', 'N/A')",
"checkout": "response.get('checkout', 'N/A')",
"address": "response.get('address', 'N/A')",
"user_id": "response.get('user_id', 'N/A')"
}
}
},
"/firmahytteordning": {
"method": "GET",
"description": "Retrieve details about Daysoff's 'Firmahytteordning' service.",
"headers": {
"Content-Type": "application/json"
},
"response": {
"description": "Information about DaysOff's Firmahytteordning.",
"content_type": "application/json",
"fields": {
"title": "response.get('title', 'N/A')",
"content": "response.get('content', [])"
}
}
},
"/personvernspolicy": {
"method": "GET",
"description": "Retrieve personvernspolicy for DaysOff.",
"headers": {
"Content-Type": "application/json"
},
"response": {
"description": "DaysOff's personvernspolicy.",
"content_type": "application/json",
"fields": {
"title": "response.get('title', 'N/A')",
"content": "response.get('content', [])"
}
}
}
}
}
# Convert to JSON string for usage in your Python application
api_docs_str = json.dumps(api_docs, indent=2)
api_docs_str
|