camparchimedes commited on
Commit
abe7880
·
verified ·
1 Parent(s): d1be294

Update api_docs.py

Browse files
Files changed (1) hide show
  1. api_docs.py +24 -27
api_docs.py CHANGED
@@ -4,40 +4,37 @@ import json
4
 
5
  # python dictionary
6
  api_docs = {
7
- "api_url": "https://aivisions.no/data/daysoff/api/v1/booking/",
8
  "endpoints": {
9
- "/bestillingsnummer": {
10
  "method": "GET",
11
- "description": "Retrieve booking details for a given booking ID.",
12
- "parameters": {
13
- "booking_id": {
14
- "type": "string",
15
- "description": "Alphanumeric identifier, (6 capital letters followed by 6 digits, e.g., DAGHNS116478) of the booking to retrieve.",
16
- "regex_pattern": "^[A-Z]{6}\\d{6}$",
17
- }
18
- },
19
- "headers": {
20
- "Authorization": "Bearer <auth_token>",
21
- "Content-Type": "application/json"
22
- },
23
- "api_response": {
24
- "description": "A JSON object containing booking details.",
25
- "content_type": "application/json",
26
- "booking_info": {
27
- "booking_id": "response.get('booking_id', 'N/A')",
28
- "full_name": "response.get('full_name', 'N/A')",
29
- "amount": "response.get('amount', 'N/A')",
30
- "checkin": "response.get('checkin', 'N/A')",
31
- "checkout": "response.get('checkout', 'N/A')",
32
- "address": "response.get('address', 'N/A')",
33
- "user_id": "response.get('user_id', 'N/A')"
34
- }
35
  }
 
 
 
 
 
 
 
 
36
  }
37
  }
38
 
39
  auth_token = ""
40
 
 
41
  api_docs_str = json.dumps(api_docs, indent=2)
42
  # daysoff_api_docs_str = str(daysoff_api_docs)
43
- api_docs_str
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  # python dictionary
6
  api_docs = {
7
+ "base_url": "https://aivisions.no/data/daysoff/api/v1/booking/",
8
  "endpoints": {
9
+ "/": {
10
  "method": "GET",
11
+ "description": "Retrieve booking information associated with a booking ID.",
12
+ "parameters": None # "/{bestllingskode}", already handled in app.py
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  }
14
+ },
15
+ "headers": {
16
+ "Authorization": "Bearer <auth_token>",
17
+ "Content-Type": "application/json"
18
+ },
19
+ "response": {
20
+ "description": "A JSON object containing booking details.",
21
+ "content_type": "application/json"
22
  }
23
  }
24
 
25
  auth_token = ""
26
 
27
+
28
  api_docs_str = json.dumps(api_docs, indent=2)
29
  # daysoff_api_docs_str = str(daysoff_api_docs)
30
+ api_docs_str
31
+
32
+
33
+
34
+
35
+ #"parameters": {
36
+ #"bestllingskode": {
37
+ #"type": "string",
38
+ #"description": "The booking ID to retrieve information for.",
39
+ #"required": true
40
+ #}