Skip to content

Commit 4c57efb

Browse files
committed
Updated API docs
1 parent 2166109 commit 4c57efb

File tree

6 files changed

+20
-29
lines changed

6 files changed

+20
-29
lines changed

public/apidoc/api_data.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ define({ "api": [
278278
"name": "DeleteBooking",
279279
"group": "Booking",
280280
"version": "1.0.0",
281-
"description": "<p>Returns the ids of all the bookings that exist within the API. Can take optional query strings to search and return a subset of booking ids.</p>",
281+
"description": "<p>Deletes a booking from the API. Requires an authorization token to be set in the header or a Basic auth header.</p>",
282282
"parameter": {
283283
"fields": {
284284
"Url Parameter": [
@@ -308,8 +308,8 @@ define({ "api": [
308308
"type": "string",
309309
"optional": true,
310310
"field": "Authorization",
311-
"defaultValue": "Basic YWRtaW46cGFzc3dvcmQxMjM=",
312-
"description": "<p>Basic authorization header to access the DELETE endpoint, can be used as an alternative to the Cookie header</p>"
311+
"defaultValue": "Basic",
312+
"description": "<p>YWRtaW46cGFzc3dvcmQxMjM=] Basic authorization header to access the DELETE endpoint, can be used as an alternative to the Cookie header</p>"
313313
}
314314
]
315315
}
@@ -666,26 +666,26 @@ define({ "api": [
666666
"type": "string",
667667
"optional": true,
668668
"field": "Authorization",
669-
"defaultValue": "Basic YWRtaW46cGFzc3dvcmQxMjM=",
670-
"description": "<p>Basic authorization header to access the PUT endpoint, can be used as an alternative to the Cookie header</p>"
669+
"defaultValue": "Basic",
670+
"description": "<p>YWRtaW46cGFzc3dvcmQxMjM=] Basic authorization header to access the PUT endpoint, can be used as an alternative to the Cookie header</p>"
671671
}
672672
]
673673
}
674674
},
675675
"examples": [
676676
{
677677
"title": "JSON example usage:",
678-
"content": "curl -X PATCH \\\n https://restful-booker.herokuapp.com/booking/1 \\\n -H 'Content-Type: application/json' \\\n -H 'Accept: application/json' \\\n -H 'Cookie: token=abc123' \\\n -d '{\n \"firstname\" : \"James\",\n \"lastname\" : \"Brown\"\n}'",
678+
"content": "curl -X PUT \\\n https://restful-booker.herokuapp.com/booking/1 \\\n -H 'Content-Type: application/json' \\\n -H 'Accept: application/json' \\\n -H 'Cookie: token=abc123' \\\n -d '{\n \"firstname\" : \"James\",\n \"lastname\" : \"Brown\"\n}'",
679679
"type": "json"
680680
},
681681
{
682682
"title": "XML example usage:",
683-
"content": "curl -X PATCH \\\n https://restful-booker.herokuapp.com/booking/1 \\\n -H 'Content-Type: text/xml' \\\n -H 'Accept: application/xml' \\\n -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQxMjM=' \\\n -d '<booking>\n <firstname>James</firstname>\n <lastname>Brown</lastname>\n </booking>'",
683+
"content": "curl -X PUT \\\n https://restful-booker.herokuapp.com/booking/1 \\\n -H 'Content-Type: text/xml' \\\n -H 'Accept: application/xml' \\\n -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQxMjM=' \\\n -d '<booking>\n <firstname>James</firstname>\n <lastname>Brown</lastname>\n </booking>'",
684684
"type": "json"
685685
},
686686
{
687687
"title": "URLencoded example usage:",
688-
"content": "curl -X PATCH \\\n https://restful-booker.herokuapp.com/booking/1 \\\n -H 'Content-Type: application/x-www-form-urlencoded' \\\n -H 'Accept: application/x-www-form-urlencoded' \\\n -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQxMjM=' \\\n -d 'firstname=Jim&lastname=Brown'",
688+
"content": "curl -X PUT \\\n https://restful-booker.herokuapp.com/booking/1 \\\n -H 'Content-Type: application/x-www-form-urlencoded' \\\n -H 'Accept: application/x-www-form-urlencoded' \\\n -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQxMjM=' \\\n -d 'firstname=Jim&lastname=Brown'",
689689
"type": "json"
690690
}
691691
],
@@ -875,8 +875,8 @@ define({ "api": [
875875
"type": "string",
876876
"optional": true,
877877
"field": "Authorization",
878-
"defaultValue": "Basic YWRtaW46cGFzc3dvcmQxMjM=",
879-
"description": "<p>Basic authorization header to access the PUT endpoint, can be used as an alternative to the Cookie header</p>"
878+
"defaultValue": "Basic",
879+
"description": "<p>YWRtaW46cGFzc3dvcmQxMjM=] Basic authorization header to access the PUT endpoint, can be used as an alternative to the Cookie header</p>"
880880
}
881881
]
882882
}

public/apidoc/api_data.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
"name": "DeleteBooking",
279279
"group": "Booking",
280280
"version": "1.0.0",
281-
"description": "<p>Returns the ids of all the bookings that exist within the API. Can take optional query strings to search and return a subset of booking ids.</p>",
281+
"description": "<p>Deletes a booking from the API. Requires an authorization token to be set in the header or a Basic auth header.</p>",
282282
"parameter": {
283283
"fields": {
284284
"Url Parameter": [
@@ -308,8 +308,8 @@
308308
"type": "string",
309309
"optional": true,
310310
"field": "Authorization",
311-
"defaultValue": "Basic YWRtaW46cGFzc3dvcmQxMjM=",
312-
"description": "<p>Basic authorization header to access the DELETE endpoint, can be used as an alternative to the Cookie header</p>"
311+
"defaultValue": "Basic",
312+
"description": "<p>YWRtaW46cGFzc3dvcmQxMjM=] Basic authorization header to access the DELETE endpoint, can be used as an alternative to the Cookie header</p>"
313313
}
314314
]
315315
}
@@ -666,8 +666,8 @@
666666
"type": "string",
667667
"optional": true,
668668
"field": "Authorization",
669-
"defaultValue": "Basic YWRtaW46cGFzc3dvcmQxMjM=",
670-
"description": "<p>Basic authorization header to access the PUT endpoint, can be used as an alternative to the Cookie header</p>"
669+
"defaultValue": "Basic",
670+
"description": "<p>YWRtaW46cGFzc3dvcmQxMjM=] Basic authorization header to access the PUT endpoint, can be used as an alternative to the Cookie header</p>"
671671
}
672672
]
673673
}
@@ -875,8 +875,8 @@
875875
"type": "string",
876876
"optional": true,
877877
"field": "Authorization",
878-
"defaultValue": "Basic YWRtaW46cGFzc3dvcmQxMjM=",
879-
"description": "<p>Basic authorization header to access the PUT endpoint, can be used as an alternative to the Cookie header</p>"
878+
"defaultValue": "Basic",
879+
"description": "<p>YWRtaW46cGFzc3dvcmQxMjM=] Basic authorization header to access the PUT endpoint, can be used as an alternative to the Cookie header</p>"
880880
}
881881
]
882882
}

public/apidoc/api_project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ define({
1717
"apidoc": "0.3.0",
1818
"generator": {
1919
"name": "apidoc",
20-
"time": "2020-09-05T20:08:34.464Z",
20+
"time": "2025-06-11T20:24:26.733Z",
2121
"url": "https://apidocjs.com",
2222
"version": "0.25.0"
2323
}

public/apidoc/api_project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"apidoc": "0.3.0",
1818
"generator": {
1919
"name": "apidoc",
20-
"time": "2020-09-05T20:08:34.464Z",
20+
"time": "2025-06-11T20:24:26.733Z",
2121
"url": "https://apidocjs.com",
2222
"version": "0.25.0"
2323
}

public/apidoc/index.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@
1010
<link href="css/style.css" rel="stylesheet" media="screen, print">
1111
<link href="img/favicon.ico" rel="icon" type="image/x-icon">
1212
<script src="vendor/polyfill.js"></script>
13-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2Q48X98CJ6"></script>
14-
<script>
15-
window.dataLayer = window.dataLayer || [];
16-
function gtag(){dataLayer.push(arguments);}
17-
gtag('js', new Date());
18-
19-
gtag('config', 'G-2Q48X98CJ6');
20-
</script>
2113
</head>
2214
<body class="container-fluid">
2315

@@ -51,7 +43,6 @@
5143
<div class="pull-left">
5244
<h1>{{name}}</h1>
5345
{{#if description}}<h2>{{{nl2br description}}}</h2>{{/if}}
54-
<p><a href="https://www.buymeacoffee.com/mwinteringham"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a tea&emoji=&slug=mwinteringham&button_colour=5F7FFF&font_colour=ffffff&font_family=Lato&outline_colour=000000&coffee_colour=FFDD00"></a></p>
5546
</div>
5647
<div class="pull-right">
5748
{{#if template.withCompare}}

routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ router.patch('/booking/:id', function(req, res) {
587587
* @apiName DeleteBooking
588588
* @apiGroup Booking
589589
* @apiVersion 1.0.0
590-
* @apiDescription Returns the ids of all the bookings that exist within the API. Can take optional query strings to search and return a subset of booking ids.
590+
* @apiDescription Deletes a booking from the API. Requires an authorization token to be set in the header or a Basic auth header.
591591
*
592592
* @apiParam (Url Parameter) {Number} id ID for the booking you want to update
593593
*

0 commit comments

Comments
 (0)