Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
updated api
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Elliott Wagner authored and Vincent Elliott Wagner committed Mar 11, 2015
1 parent e142a7d commit 2876950
Showing 5 changed files with 194 additions and 35 deletions.
39 changes: 8 additions & 31 deletions api/v1/lakes/index.js
Original file line number Diff line number Diff line change
@@ -158,9 +158,7 @@
* }
* },
* "messages": {
* "54e88e163aa8ccc41e1ab82e" : {
* ...
* }
* "54e88e163aa8ccc41e1ab82e" : [...]
* }
* }
*/
@@ -494,34 +492,13 @@
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* {
* "weather":{
* "current": {
* "wind": {
* "speed": 1.72,
* "deg": 276.504
* },
* "clouds": {
* "all": 88
* },
* "weather":
* [
* {
* "icon": "04d",
* "description": "overcast clouds",
* "main": "Clouds",
* "id": 804,
* "_id": "54fefa48a2f4c5151b8f302b"
* }
* ],
* "temp": "8.291",
* "temp_min": 8.291,
* "temp_max": 8.291,
* "humidity": 90,
* "pressure": 978.14,
* "lastUpdated": "2015-03-10T13:44:23.000Z"
* },
* "openWeatherCityId": 2812482
* }
* "messages": [
* {
* "message": "Badebetrieb am Perfstausee wird bis auf Weiteres eingestellt",
* "date": "2015-03-09T23:00:00.000Z",
* "_id": "54fefa48a2f4c5151b8f320a"
* }
* ]
* }
*
*
93 changes: 92 additions & 1 deletion doc/api_data.js
Original file line number Diff line number Diff line change
@@ -86,6 +86,35 @@ define({ "api": [
"filename": "api/v1/lakes/index.js",
"groupTitle": "Lakes"
},
{
"type": "get",
"url": "/lakes/allmessages",
"title": "get the messages of all lakes",
"name": "GetAllMessages",
"group": "Lakes",
"success": {
"fields": {
"200": [
{
"group": "200",
"optional": false,
"field": "200",
"description": "<p>OK</p> "
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"_links\": {\n \"self\": {\n \"href\": \"/api/v1/lakes/allmessages\"\n }\n },\n \"messages\": {\n \"54e88e163aa8ccc41e1ab82e\" : [...]\n }\n}",
"type": "json"
}
]
},
"version": "0.0.0",
"filename": "api/v1/lakes/index.js",
"groupTitle": "Lakes"
},
{
"type": "get",
"url": "/lakes/allweather",
@@ -392,6 +421,68 @@ define({ "api": [
]
}
},
{
"type": "get",
"url": "/lake/:id/messages",
"title": "Get lake messages",
"name": "GetLakeMessages",
"group": "Lakes",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>unique lake id</p> "
}
]
}
},
"success": {
"fields": {
"200": [
{
"group": "200",
"type": "Array",
"optional": false,
"field": "messages",
"description": ""
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"messages\": [\n {\n \"message\": \"Badebetrieb am Perfstausee wird bis auf Weiteres eingestellt\",\n \"date\": \"2015-03-09T23:00:00.000Z\",\n \"_id\": \"54fefa48a2f4c5151b8f320a\"\n }\n ]\n }",
"type": "json"
}
]
},
"version": "0.0.0",
"filename": "api/v1/lakes/index.js",
"groupTitle": "Lakes",
"error": {
"fields": {
"404 Not Found": [
{
"group": "404 Not Found",
"optional": false,
"field": "LakeNotFound",
"description": "<p>The id of the Lake was not found.</p> "
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"LakeNotFound\"\n}",
"type": "json"
}
]
}
},
{
"type": "get",
"url": "/lake/:id/weather",
@@ -416,7 +507,7 @@ define({ "api": [
"200": [
{
"group": "200",
"type": "Array",
"type": "Object",
"optional": false,
"field": "weatherdata",
"description": ""
93 changes: 92 additions & 1 deletion doc/api_data.json
Original file line number Diff line number Diff line change
@@ -86,6 +86,35 @@
"filename": "api/v1/lakes/index.js",
"groupTitle": "Lakes"
},
{
"type": "get",
"url": "/lakes/allmessages",
"title": "get the messages of all lakes",
"name": "GetAllMessages",
"group": "Lakes",
"success": {
"fields": {
"200": [
{
"group": "200",
"optional": false,
"field": "200",
"description": "<p>OK</p> "
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"_links\": {\n \"self\": {\n \"href\": \"/api/v1/lakes/allmessages\"\n }\n },\n \"messages\": {\n \"54e88e163aa8ccc41e1ab82e\" : [...]\n }\n}",
"type": "json"
}
]
},
"version": "0.0.0",
"filename": "api/v1/lakes/index.js",
"groupTitle": "Lakes"
},
{
"type": "get",
"url": "/lakes/allweather",
@@ -392,6 +421,68 @@
]
}
},
{
"type": "get",
"url": "/lake/:id/messages",
"title": "Get lake messages",
"name": "GetLakeMessages",
"group": "Lakes",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>unique lake id</p> "
}
]
}
},
"success": {
"fields": {
"200": [
{
"group": "200",
"type": "Array",
"optional": false,
"field": "messages",
"description": ""
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"messages\": [\n {\n \"message\": \"Badebetrieb am Perfstausee wird bis auf Weiteres eingestellt\",\n \"date\": \"2015-03-09T23:00:00.000Z\",\n \"_id\": \"54fefa48a2f4c5151b8f320a\"\n }\n ]\n }",
"type": "json"
}
]
},
"version": "0.0.0",
"filename": "api/v1/lakes/index.js",
"groupTitle": "Lakes",
"error": {
"fields": {
"404 Not Found": [
{
"group": "404 Not Found",
"optional": false,
"field": "LakeNotFound",
"description": "<p>The id of the Lake was not found.</p> "
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"LakeNotFound\"\n}",
"type": "json"
}
]
}
},
{
"type": "get",
"url": "/lake/:id/weather",
@@ -416,7 +507,7 @@
"200": [
{
"group": "200",
"type": "Array",
"type": "Object",
"optional": false,
"field": "weatherdata",
"description": ""
2 changes: 1 addition & 1 deletion doc/api_project.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ define({
"apidoc": "0.2.0",
"generator": {
"name": "apidoc",
"time": "2015-03-10T14:33:57.905Z",
"time": "2015-03-11T09:58:57.795Z",
"url": "http://apidocjs.com",
"version": "0.12.1"
}
2 changes: 1 addition & 1 deletion doc/api_project.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"apidoc": "0.2.0",
"generator": {
"name": "apidoc",
"time": "2015-03-10T14:33:57.905Z",
"time": "2015-03-11T09:58:57.795Z",
"url": "http://apidocjs.com",
"version": "0.12.1"
}

0 comments on commit 2876950

Please sign in to comment.