Skip to content

Commit 17df224

Browse files
author
Lionel Laské
committed
Update documentation for v1.1.0
1 parent 7167e78 commit 17df224

File tree

13 files changed

+5199
-17
lines changed

13 files changed

+5199
-17
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ A full documentation of the API is available in http://127.0.0.1:8080/docs.
189189

190190
To generate docs, run the following command in `terminal`.
191191

192-
apidoc -i api/controller -i dashboard/helper -o docs/www/
192+
npm install -d
193+
npm install apidoc -g
194+
apidoc -i api/controller -i dashboard/helper -o docs/www/
193195

194196

195197
## Import users from a CSV file
@@ -248,7 +250,8 @@ Few parameters in the **[security]** section of the setting file are dedicated t
248250
Sugarizer Server includes a set of unit tests on the API.
249251
To run unit tests for Sugarizer Server launch:
250252

251-
npm test
253+
npm install -d
254+
npm test
252255

253256
Note that settings for unit testing are defined in [env/test.ini](env/test.ini).
254257

api/controller/auth.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ exports.login = function(req, res) {
9898
* @api {post} auth/signup/ Signup User
9999
* @apiName Signup User
100100
* @apiDescription Add a new user (Admin or Student). Return the user created.
101+
*
102+
* For security reason, call to signup for an Admin is only allowed from the server address.
101103
* @apiGroup Auth
102104
* @apiVersion 1.0.0
103105
*

api/controller/classrooms.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,14 @@ exports.addClassroom = function(req, res) {
8787
};
8888

8989
/**
90-
* @api {delete} api/v1/classrooms Remove classroom
90+
* @api {delete} api/v1/classrooms/:id Remove classroom
9191
* @apiName RemoveClassroom
9292
* @apiDescription Remove the classroom by id.
9393
* @apiGroup Classrooms
9494
* @apiVersion 1.1.0
9595
* @apiHeader {String} x-key User unique id.
9696
* @apiHeader {String} x-access-token User access token.
97-
*
98-
* @apiParam {String} classid Unique id of the classroom to delete Classroom
97+
* @apiParam {String} id Unique id of the classroom to delete
9998
*
10099
* @apiSuccessExample {json} Success-Response:
101100
* HTTP/1.1 200 OK

apidoc.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Sugarizer",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Sugarizer Server API",
55
"title": "Sugarizer Server API",
66
"url" : "/",
@@ -15,8 +15,9 @@
1515
"order": [
1616
"Information",
1717
"Auth",
18-
"Users",
1918
"Activities",
19+
"Users",
20+
"Classrooms",
2021
"Journal",
2122
"Stats",
2223
"Login",
@@ -29,6 +30,11 @@
2930
"AddUser",
3031
"UpdateUser",
3132
"RemoveUser",
33+
"GetAllclassrooms",
34+
"GetClassroom",
35+
"Addclassroom",
36+
"UpdateClassroom",
37+
"RemoveClassroom",
3238
"GetAllJournals",
3339
"GetJournalContent",
3440
"GetEntry",

dashboard/helper/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ exports.getAPIUrl = function(req) {
117117
* @apiSuccess {Object} settings.options Server options
118118
* @apiSuccess {String} settings.options.min-password-size Minimum size for password
119119
* @apiSuccess {Boolean} settings.options.statistics Statistics active or not
120-
* @apiSuccess {String} settings.options.cooke-age Expiration time for authentication token
120+
* @apiSuccess {String} settings.options.cookie-age Expiration time for authentication token
121121
*
122122
* @apiSuccessExample Success-Response:
123123
* HTTP/1.1 200 OK

docs/docfooter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
Sugarizer is an open source software under [Apache 2 licence](http://www.apache.org/licenses/LICENSE-2.0), source code is available on [Github](https://github.com/llaske/sugarizer).
2+
Sugarizer is an open source software under [Apache 2 licence](http://www.apache.org/licenses/LICENSE-2.0), source code is available on [Github](https://github.com/llaske/sugarizer-server).
33

44
© 2013-2019, Lionel Laské, Sugar Labs Inc and Contributors.

docs/docheader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
### Welcome to the Sugarizer Server API documentation
33

4-
Please visit [https://sugarizer.org](https://sugarizer.org/) for a full description of Sugarizer and [Github](https://github.com/llaske/sugarizer-server) for more technical information and to access to source code.
4+
Sugarizer Server is the server side of Sugarizer. Please visit [https://sugarizer.org](https://sugarizer.org/) for a full description of Sugarizer and [Github](https://github.com/llaske/sugarizer-server) for more technical information on Sugarizer Server and to access to source code.

docs/www/api_data.js

Lines changed: 2531 additions & 1 deletion
Large diffs are not rendered by default.

docs/www/api_data.json

Lines changed: 2531 additions & 1 deletion
Large diffs are not rendered by default.

docs/www/api_project.js

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,57 @@
1-
define({ "name": "Sugarizer", "version": "1.0.0", "description": "Sugarizer Server API", "title": "Sugarizer Server API", "url": "/", "header": { "title": "About", "content": "<h3>Welcome to the Sugarizer Server API documentation</h3>\n<p>Please visit <a href=\"https://sugarizer.org/\">https://sugarizer.org</a> for a full description of Sugarizer and <a href=\"https://github.com/llaske/sugarizer-server\">Github</a> for more technical information and to access to source code.</p>\n" }, "footer": { "title": "License", "content": "<p>Sugarizer is an open source software under <a href=\"http://www.apache.org/licenses/LICENSE-2.0\">Apache 2 licence</a>, source code is available on <a href=\"https://github.com/llaske/sugarizer\">Github</a>.</p>\n<p>© 2013-2019, Lionel Laské, Sugar Labs Inc and Contributors.</p>\n" }, "order": [ "Information", "Auth", "Users", "Activities", "Journal", "Stats", "Login", "Signup", "GetAllActivities", "GetActivity", "UpdateActivities", "GetAllUsers", "GetUser", "AddUser", "UpdateUser", "RemoveUser", "GetAllJournals", "GetJournalContent", "GetEntry", "AddEntry", "UpdateEntry", "RemoveEntryJournal", "GetAllStats", "AddStats", "RemoveStats" ], "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2019-01-29T21:07:37.431Z", "url": "http://apidocjs.com", "version": "0.17.7" }});
1+
define({
2+
"name": "Sugarizer",
3+
"version": "1.1.0",
4+
"description": "Sugarizer Server API",
5+
"title": "Sugarizer Server API",
6+
"url": "/",
7+
"header": {
8+
"title": "About",
9+
"content": "<h3>Welcome to the Sugarizer Server API documentation</h3>\n<p>Sugarizer Server is the server side of Sugarizer. Please visit <a href=\"https://sugarizer.org/\">https://sugarizer.org</a> for a full description of Sugarizer and <a href=\"https://github.com/llaske/sugarizer-server\">Github</a> for more technical information on Sugarizer Server and to access to source code.</p>\n"
10+
},
11+
"footer": {
12+
"title": "License",
13+
"content": "<p>Sugarizer is an open source software under <a href=\"http://www.apache.org/licenses/LICENSE-2.0\">Apache 2 licence</a>, source code is available on <a href=\"https://github.com/llaske/sugarizer-server\">Github</a>.</p>\n<p>© 2013-2019, Lionel Laské, Sugar Labs Inc and Contributors.</p>\n"
14+
},
15+
"order": [
16+
"Information",
17+
"Auth",
18+
"Activities",
19+
"Users",
20+
"Classrooms",
21+
"Journal",
22+
"Stats",
23+
"Login",
24+
"Signup",
25+
"GetAllActivities",
26+
"GetActivity",
27+
"UpdateActivities",
28+
"GetAllUsers",
29+
"GetUser",
30+
"AddUser",
31+
"UpdateUser",
32+
"RemoveUser",
33+
"GetAllclassrooms",
34+
"GetClassroom",
35+
"Addclassroom",
36+
"UpdateClassroom",
37+
"RemoveClassroom",
38+
"GetAllJournals",
39+
"GetJournalContent",
40+
"GetEntry",
41+
"AddEntry",
42+
"UpdateEntry",
43+
"RemoveEntryJournal",
44+
"GetAllStats",
45+
"AddStats",
46+
"RemoveStats"
47+
],
48+
"sampleUrl": false,
49+
"defaultVersion": "0.0.0",
50+
"apidoc": "0.3.0",
51+
"generator": {
52+
"name": "apidoc",
53+
"time": "2019-05-12T08:50:56.954Z",
54+
"url": "http://apidocjs.com",
55+
"version": "0.17.7"
56+
}
57+
});

0 commit comments

Comments
 (0)