daysoff_assistant / api_docs_mck.py
camparchimedes's picture
Update api_docs_mck.py
b06e6cd verified
raw
history blame
2.72 kB
import json
# API Documentation
api_docs = {
"base_url": "https://670dccd0073307b4ee447f2f.mockapi.io/daysoff/api/V1",
"endpoints": {
"booking": {
"method": "GET",
"url": "/booking",
"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",
"url": "/firmahytteordning",
"description": "Retrieve details about Daysoff's 'Firmahytteordning' service.",
"parameters": {
"search": {
"type": "string",
"description": "The unique identifier of the booking to retrieve."
}
},
"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",
"url": "/personvernspolicy",
"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)