-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run tests by travis, hopefully fix apidoc build
- Loading branch information
1 parent
d3e3968
commit 0116f6a
Showing
8 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ version.js | |
*.log | ||
.github | ||
tests | ||
apidoc | ||
apidoc.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ mongo-data | |
.env | ||
doc/ | ||
version.js | ||
|
||
apidoc | ||
apidoc.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,8 @@ | |
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
currentBranch=$(git branch | grep -e "^*" | cut -d' ' -f 2) | ||
|
||
if [ "$currentBranch" != "master" ]; then | ||
echo "Docs can only be built from 'master' branch" | ||
if [[ -n "${TRAVIS_TAG}" ]]; then | ||
echo "Docs can only be built from tags" | ||
exit 0 | ||
fi | ||
|
||
|
@@ -16,6 +14,9 @@ cd "$TRAVIS_BUILD_DIR" | |
# install apidocs | ||
npm install -g [email protected] | ||
|
||
# append the current version | ||
sed -i "1 s|$| ${TRAVIS_TAG}|" apidoc/introduction.md | ||
|
||
# run apidoc | ||
apidoc -i . -f js -e node_modules | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
sudo: false | ||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
git: | ||
depth: 1 | ||
|
||
language: node_js | ||
node_js: | ||
- "6" | ||
- "8" | ||
|
||
install: true | ||
script: ./.scripts/deploy-docs.sh | ||
script: | ||
- ./.scripts/run-tests.sh | ||
- ./.scripts/deploy-docs.sh | ||
|
||
env: | ||
global: | ||
- GITHUB_REPO: "sensebox/openSenseMap-API" | ||
- secure: "B1S19gMUgYsGSDcQGu9iXyC2Gv/I0Saw64cthMPXck4Scbog6vAQ4b8Zp2LvgcnfYGv+714KCrv1AunF0xdt/7CNi4426cyvmB8uNV5fZRaSrCq6iWOzqI616OLY7jwJ7Fu21PL7RgwZjoe4JKxY8XoSqnoDdZgclblL96ALfSY=" | ||
|
||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "", | ||
"title": "openSenseMap API documentation", | ||
"url": "https://api.opensensemap.org", | ||
"order": [ | ||
"register", | ||
"getBox", | ||
"getBoxes", | ||
"postNewBox", | ||
"updateBox", | ||
"deleteBox", | ||
"getScript", | ||
"postNewMeasurement", | ||
"getMeasurements", | ||
"getData", | ||
"calculateIdw" | ||
], | ||
"template": { | ||
"withCompare": false | ||
}, | ||
"header": { | ||
"title": "Introduction", | ||
"filename": "apidoc/introduction.md" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
 | ||
|
||
<br />Documentation of the routes and methods to manage [users](#api-Users), [stations (also called boxes or senseBoxes)](#api-Boxes), and [measurements](#api-Measurements) in the openSenseMap API. | ||
You can find the API running at [https://api.opensensemap.org/](https://api.opensensemap.org/). | ||
|
||
## Timestamps | ||
|
||
Please note that the API handles every timestamp in [Coordinated universal time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) time zone. Timestamps in parameters should be in RFC 3339 notation. | ||
|
||
Timestamp without Milliseconds: | ||
|
||
2018-02-01T23:18:02Z | ||
|
||
Timestamp with Milliseconds: | ||
|
||
2018-02-01T23:18:02.412Z | ||
|
||
## IDs | ||
|
||
All stations and sensors of stations receive a unique public identifier. These identifiers are exactly 24 character long and only contain digits and characters a to f. | ||
|
||
Example: | ||
|
||
5a8d1c25bc2d41001927a265 | ||
|
||
## Source code and Licenses | ||
|
||
You can find the whole source code of the API at GitHub in the [sensebox/openSenseMap-API](https://github.com/sensebox/openSenseMap-API) repository. You can obtain the code under the MIT License. | ||
|
||
The data obtainable through the openSenseMap API at [https://api.opensensemap.org/](https://api.opensensemap.org/) is licensed under the [Public Domain Dedication and License 1.0](https://opendatacommons.org/licenses/pddl/summary/). | ||
|
||
If you there is something unclear or there is a mistake in this documentation please open an [issue](https://github.com/sensebox/openSenseMap-API/issues/new) in the GitHub repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters