File size: 1,858 Bytes
47de06c
 
 
 
f2272c5
103353a
abe7880
47de06c
abe7880
3824e8e
abe7880
3824e8e
 
 
 
 
f2272c5
3824e8e
 
 
 
47de06c
abe7880
 
a24be74
abe7880
 
 
9d9b56a
0b40112
9d9b56a
 
 
 
 
 
 
 
 
 
 
47de06c
 
 
f2272c5
a24be74
70464c1
103353a
70464c1
f2272c5
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
### api_docs.py

import json

# python dict.
api_docs = {
    "base_url": "https://aivisions.no/data/daysoff/api/v1/booking/",
    "endpoints": {
        "/": {
            "method": "POST",
            "description": "Retrieve booking information associated with a booking ID.",
            #"parameters": None
            "parameters": {
                "body": {
                    "booking_id": {
                        "type": "string",
                        #"required": true,
                        "description": "The unique identifier for a booking."
                    }
                }
            }
        }
    },
    "headers": {
        "Authorization": "Bearer <auth_token>",
        "Content-Type": "application/json"
    },
    "response": {
        "description": "A JSON object containing booking details for a specific booking id.",
        "content_type": "application/json",
        #"fields": {
            #"booking_id": "The unique identifier for the booking.",
            #"full_name": "The full name of the customer associated with the booking.",
            #"amount": "The total amount for the booking (integer).",
            #"checkin": "The check-in date for the booking.", # --datetime format is 2024-12-20T15:00:00  
            #"checkout": "The check-out date for the booking.", # --datetime format is 2024-12-20T15:00:00
            #"address": "The address associated with the booking.",
            #"user_id": "The user ID associated with the booking (integer).",
            #"infotext": "Additional information related to the booking.",
            #"included": "Details of services included in the booking."
        #}
    }
}


auth_token = "abc123def456ghi789jkl012mno345pqr678stu901vwx234yz567"

api_docs_str = json.dumps(api_docs, indent=2)
# daysoff_api_docs_str = str(daysoff_api_docs)
api_docs_str