diff --git a/apidoc.json b/apidoc.json new file mode 100644 index 0000000..74d1622 --- /dev/null +++ b/apidoc.json @@ -0,0 +1,7 @@ +{ + "name": "CloudBudget API", + "version": "1.0.0", + "description": "An API to manage CloudBudget", + "title": "CloudBudget API", + "url" : "http://cloudbudget.pavnay.fr/api" +} \ No newline at end of file diff --git a/app/routes/accounts.js b/app/routes/accounts.js index 46088fc..d373b08 100644 --- a/app/routes/accounts.js +++ b/app/routes/accounts.js @@ -2,19 +2,448 @@ var passport = require('../security/passport'), AccountController = require('../controllers/accounts'); module.exports = function(app) { - + /** + * @api {post} /accounts Create account + * @apiVersion 1.0.0 + * @apiName Create account + * @apiGroup Accounts + * + * @apiParam {String} name Name for the new account + * @apiParam {String} reference A reference (bank account number) for the new account + * @apiParamExample {json} Request-Example: + * { + * name: 'Home', + * reference: '1234567890' + * } + * + * @apiHeader {String} Content-Type application/json + * + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + * + * @apiSuccess (201) {Object} account The new account with its (sub)categories. + * @apiSuccessExample Success-Response: + * HTTP/1.1 201 Created + * { + * "name": "Home", + * "reference": "1234567890", + * "user_id": "55e6e4e005230f49271c7078", + * "_id": "55e8218912c65a1730c34858", + * "created_at": "2015-09-03T10:31:37.889Z", + * "categories": [ + * { + * "key": "alimony_payments", + * "label": "Alimony Payments", + * "_id": "55e8218912c65a1730c34859", + * "sub_categories": [] + * }, + * { + * "key": "automobile_expenses", + * "label": "Automobile Expenses", + * "_id": "55e8218912c65a1730c3485a", + * "sub_categories": [ + * { + * "label": "Car Payment", + * "key": "car_payment", + * "_id": "55e8218912c65a1730c3485d" + * } + * ] + * } + * ] + * } + * + * @apiError (400) {json} BadRequest The user can't be found. + * + * @apiErrorExample BadRequest: + * HTTP/1.1 400 Bad Request + * [ + * { + * "field": "name", + * "rule": "required", + * "message": "Path `name` is required." + * } + * ] + * + */ app.post('/api/accounts', passport.jwt, AccountController.create); - + + /** + * @api {delete} /accounts/:account_id Delete account + * @apiVersion 1.0.0 + * @apiName Delete account + * @apiGroup Accounts + * + * @apiParam {String} account_id The account to delete + * + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + * + * @apiSuccess (204) - + * @apiSuccessExample Success-Response: + * HTTP/1.1 204 No Content + * + * @apiError (404) {json} AccountNotFound The account can't be found. + * @apiErrorExample AccountNotFound: + * HTTP/1.1 404 Not Found + * { + * "message": "Unknown account" + * } + */ app.delete('/api/accounts/:account_id', passport.jwt, AccountController.delete); - + + /** + * @api {get} /accounts/:account_id Get account + * @apiVersion 1.0.0 + * @apiName Get account + * @apiGroup Accounts + * + * @apiParam {String} account_id The given account + * + * @apiHeader {String} Content-Type application/json + * + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + * + * @apiSuccess (200) {Object} account The account with its (sub)categories. + * @apiSuccessExample Success-Response: + * HTTP/1.1 200 OK + * { + * "name": "Home", + * "reference": "1234567890", + * "user_id": "55e6e4e005230f49271c7078", + * "_id": "55e8218912c65a1730c34858", + * "created_at": "2015-09-03T10:31:37.889Z", + * "categories": [ + * { + * "key": "alimony_payments", + * "label": "Alimony Payments", + * "_id": "55e8218912c65a1730c34859", + * "sub_categories": [] + * }, + * { + * "key": "automobile_expenses", + * "label": "Automobile Expenses", + * "_id": "55e8218912c65a1730c3485a", + * "sub_categories": [ + * { + * "label": "Car Payment", + * "key": "car_payment", + * "_id": "55e8218912c65a1730c3485d" + * } + * ] + * } + * ] + * } + * + * @apiError (404) {json} AccountNotFound The account can't be found. + * @apiErrorExample AccountNotFound: + * HTTP/1.1 404 Not Found + * { + * "message": "Unknown account" + * } + */ app.get('/api/accounts/:account_id', passport.jwt, AccountController.get); - + + /** + * @api {put} /accounts/:account_id Modify account + * @apiVersion 1.0.0 + * @apiName Modify account + * @apiGroup Accounts + * + * @apiParam {String} account_id The account id to modify + * @apiParam {String} name Name for the new account + * @apiParam {String} reference A reference (bank account number) for the new account + * @apiParamExample {json} Request-Example: + * { + * name: 'Home', + * reference: '1234567890' + * } + * + * @apiHeader {String} Content-Type application/json + * + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + * + * @apiSuccess {String} username Username of the User. + * @apiSuccess {String} token The JWT valid token. + * @apiSuccessExample Success-Response: + * HTTP/1.1 200 OK + * { + * "name": "Home", + * "reference": "1234567890", + * "user_id": "55e6e4e005230f49271c7078", + * "_id": "55e8218912c65a1730c34858", + * "created_at": "2015-09-03T10:31:37.889Z", + * "categories": [ + * { + * "key": "alimony_payments", + * "label": "Alimony Payments", + * "_id": "55e8218912c65a1730c34859", + * "sub_categories": [] + * }, + * { + * "key": "automobile_expenses", + * "label": "Automobile Expenses", + * "_id": "55e8218912c65a1730c3485a", + * "sub_categories": [ + * { + * "label": "Car Payment", + * "key": "car_payment", + * "_id": "55e8218912c65a1730c3485d" + * } + * ] + * } + * ] + * } + * + * @apiError (400) {json} BadRequest The user can't be found. + * @apiErrorExample BadRequest: + * HTTP/1.1 400 Bad Request + * [ + * { + * "field": "name", + * "rule": "required", + * "message": "Path `name` is required." + * } + * ] + * @apiError (404) {json} AccountNotFound The account can't be found. + * @apiErrorExample AccountNotFound: + * HTTP/1.1 404 Not Found + * { + * "message": "Unknown account" + * } + */ app.put('/api/accounts/:account_id', passport.jwt, AccountController.modify); - + + /** + * @api {post} /accounts/:account_id/entries Create entry + * @apiVersion 1.0.0 + * @apiName Create entry + * @apiGroup Entries + * + * @apiParam {String} account_id The account id to populate + * @apiParam {String} amount Amount of the entry + * @apiParam {String} date Date of the bill/deposit + * @apiParam {String} [category] Category id of the bill/deposit + * @apiParam {String} [sub_category] Sub category id of the bill/deposit + * @apiParam {String} [label] A label for the entry + * @apiParamExample {json} Request-Example: + * { + * amount: 1000, + * date: 2015-09-03T10:04:11.481Z + * } + * + * @apiHeader {String} Content-Type application/json + * + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + * + * @apiSuccess (201) {Object} entry The created entry. + * @apiSuccess (201) {Object[]} entries All account's entries + * @apiSuccess (201) {Number} balance The account's total balance + * @apiSuccessExample Success-Response: + * HTTP/1.1 201 Created + * { + * entry: { + * _id: '', + * account_id: '1000', + * type: 'DEPOSIT' + * amount: 1000, + * date: 2015-09-03T10:04:11.481Z + * }, + * entries: [ + * { + * _id: '', + * account_id: '1000', + * type: 'DEPOSIT' + * amount: 1000, + * date: 2015-09-03T10:04:11.481Z + * } + * ], + * balance: 1000 + * } + * + * @apiError (400) {json} BadRequest The user can't be found. + * @apiErrorExample BadRequest: + * HTTP/1.1 400 Bad Request + * [ + * { + * "field": "amount", + * "rule": "required", + * "message": "Path `amount` is required." + * } + * ] + * + * @apiError (404) {json} AccountNotFound The account can't be found. + * @apiErrorExample AccountNotFound: + * HTTP/1.1 404 Not Found + * { + * "message": "Unknown account" + * } + */ app.post('/api/accounts/:account_id/entries', passport.jwt, AccountController.add_entry); - + + /** + * @api {post} /accounts/:account_id/entries/:entry_id Modify entry + * @apiVersion 1.0.0 + * @apiName Modify entry + * @apiGroup Entries + * + * @apiParam {String} account_id The owner account + * @apiParam {String} entry_id The entry to modify + * @apiParam {String} amount Amount of the entry + * @apiParam {String} date Date of the bill/deposit + * @apiParam {String} [category] Category id of the bill/deposit + * @apiParam {String} [sub_category] Sub category id of the bill/deposit + * @apiParam {String} [label] A label for the entry + * @apiParamExample {json} Request-Example: + * { + * amount: 1000, + * date: 2015-09-03T10:04:11.481Z + * } + * + * @apiHeader {String} Content-Type application/json + * + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + * + * @apiSuccess (200) {Object} entry The created entry. + * @apiSuccess (200) {Object[]} entries All account's entries + * @apiSuccess (200) {Number} balance The account's total balance + * @apiSuccessExample Success-Response: + * HTTP/1.1 200 OK + * { + * entry: { + * _id: '', + * account_id: '1000', + * type: 'DEPOSIT' + * amount: 1000, + * date: 2015-09-03T10:04:11.481Z + * }, + * entries: [ + * { + * _id: '', + * account_id: '1000', + * type: 'DEPOSIT' + * amount: 1000, + * date: 2015-09-03T10:04:11.481Z + * } + * ], + * balance: 1000 + * } + * + * @apiError (400) {json} BadRequest The user can't be found. + * @apiErrorExample BadRequest: + * HTTP/1.1 400 Bad Request + * [ + * { + * "field": "amount", + * "rule": "required", + * "message": "Path `amount` is required." + * } + * ] + * + * @apiError (404) {json} AccountNotFound The account can't be found. + * @apiErrorExample AccountNotFound: + * HTTP/1.1 404 Not Found + * { + * "message": "Unknown account" + * } + * @apiError (404) {json} EntryNotFound The entry can't be found. + * @apiErrorExample AccountNotFound: + * HTTP/1.1 404 Not Found + */ app.put('/api/accounts/:account_id/entries/:entry_id', passport.jwt, AccountController.modify_entry); - + + /** + * @api {delete} /accounts/:account_id/entries/:entry_id Delete entry + * @apiVersion 1.0.0 + * @apiName Delete entry + * @apiGroup Entries + * + * @apiParam {String} account_id The owner account + * @apiParam {String} entry_id The entry to delete + * + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + * + * @apiSuccess (204) - + * @apiSuccessExample Success-Response: + * HTTP/1.1 204 No Content + * + * @apiError (404) {json} AccountNotFound The account can't be found. + * @apiErrorExample AccountNotFound: + * HTTP/1.1 404 Not Found + * { + * "message": "Unknown account" + * } + * @apiError (404) {json} EntryNotFound The entry can't be found. + * @apiErrorExample AccountNotFound: + * HTTP/1.1 404 Not Found + */ app.delete('/api/accounts/:account_id/entries/:entry_id', passport.jwt, AccountController.delete_entry); app.get('/api/accounts/:account_id/entries', passport.jwt, AccountController.list_entries); diff --git a/app/routes/users.js b/app/routes/users.js index 830bdb8..eb3f85d 100644 --- a/app/routes/users.js +++ b/app/routes/users.js @@ -3,11 +3,139 @@ var passport = require('../security/passport'), module.exports = function(app) { + /** + * @api {post} /users/login Login + * @apiVersion 1.0.0 + * @apiName Login + * @apiGroup Users + * + * @apiHeader {String} Content-Type application/json + * + * @apiParam {String} username User's username + * @apiParam {String} password User's password + * @apiParamExample {json} Request-Example: + * { + * "username": "John", + * "password": "s3cr3t" + * } + * + * @apiSuccess {String} username Username of the User. + * @apiSuccess {String} token The JWT valid token. + * + * @apiSuccessExample Success-Response: + * HTTP/1.1 200 OK + * { + * "username": "John", + * "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + * + */ app.post('/api/users/login', passport.local, UserController.login); - + + /** + * @api {delete} /users/login Logout + * @apiVersion 1.0.0 + * @apiName Logout + * @apiGroup Users + * + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * + * @apiSuccessExample Success-Response: + * HTTP/1.1 200 OK + * + */ app.delete('/api/users/login', UserController.logout); - + + /** + * @api {post} /users Registration + * @apiVersion 1.0.0 + * @apiName Registration + * @apiGroup Users + * + * @apiHeader {String} Content-Type application/json + * + * @apiParam {String} username User's username + * @apiParam {String} password User's password + * @apiParam {String} [language='en'] User's default language + * @apiParamExample {json} Request-Example: + * { + * "username": "John", + * "password": "s3cr3t", + * "language": "en" + * } + * + * @apiSuccess (201) {String} username Username of the User. + * @apiSuccess (201) {String} token The JWT valid token. + * @apiSuccessExample Success-Response: + * HTTP/1.1 201 OK + * { + * "username": "John", + * "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * + * @apiError (409) {json} UserAlreadyExist The user can't be found. + * @apiErrorExample {json} UserAlreadyExist: + * HTTP/1.1 409 Not Found + * { + * "message": "Account already exists" + * } + * + * @apiError (400) {json} BadRequest Validation errors. + * @apiErrorExample {json} BadRequest: + * HTTP/1.1 400 Bad Request + * [ + * { + * "field": "password", + * "rule": "required", + * "message": "Path `password` is required." + * }, + * { + * "field": "username", + * "rule": "required", + * "message": "Path `username` is required." + * } + * ] + * + * + */ app.post('/api/users', UserController.subscribe); - + + /** + * @api {delete} /users Unregistration + * @apiVersion 1.0.0 + * @apiName Unregistration + * @apiGroup Users + * + * @apiHeader {String} Content-Type application/json + * @apiHeader {String} Authentication The valid JWT token provided by the {post} /users/login resource + * @apiHeaderExample {string} Authentication header example: + * { + * "Authentication": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ" + * } + * + * @apiSuccess (204) - + * @apiSuccessExample Success-Response: + * HTTP/1.1 204 No Content + * + * @apiError (401) {json} AuthenticationFailed The user can't be found. + * @apiErrorExample AuthenticationFailed: + * HTTP/1.1 401 Not Found + * { + * "message": "Authentication failed" + * } + + * + */ app.delete('/api/users', passport.jwt, UserController.unsubscribe); }; \ No newline at end of file diff --git a/package.json b/package.json index 0775cc8..1922d7a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "git", "url": "https://github.com/Febbweiss/CloudBudget" }, - "bugs" : { + "bugs": { "url": "https://github.com/Febbweiss/CloudBudget/issues" }, "dependencies": { @@ -23,6 +23,7 @@ "passport-jwt": "~1.1.0" }, "devDependencies": { + "apidoc": "^0.13.1", "chai": "^3.2.0", "coveralls": "^2.11.4", "istanbul": "^0.3.18", @@ -32,7 +33,8 @@ "supertest": "~1.0.1" }, "scripts": { - "test-local": "NODE_ENV=test mocha test/*", + "generate-doc": "./node_modules/apidoc/bin/apidoc -i app/ -o public", + "test-local": "NODE_ENV=test ./node_modules/mocha/bin/mocha test/*", "test": "NODE_ENV=test ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec test/*", "start": "app.js", "stop": "pkill -SIGINT CloudBudget" diff --git a/public/api_data.js b/public/api_data.js new file mode 100644 index 0000000..f7f8212 --- /dev/null +++ b/public/api_data.js @@ -0,0 +1,1279 @@ +define({ "api": [ + { + "type": "post", + "url": "/accounts", + "title": "Create account", + "version": "1.0.0", + "name": "Create_account", + "group": "Accounts", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "
String
", + "optional": false, + "field": "name", + "description": "Name for the new account
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "reference", + "description": "A reference (bank account number) for the new account
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{\n name: 'Home',\n reference: '1234567890'\n}", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "The user can't be found.
" + } + ], + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"name\",\n \"rule\": \"required\",\n \"message\": \"Path `name` is required.\"\n }\n ]", + "type": "json" + } + ] + }, + "success": { + "fields": { + "201": [ + { + "group": "201", + "type": "Object
", + "optional": false, + "field": "account", + "description": "The new account with its (sub)categories.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 201 Created\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Accounts" + }, + { + "type": "delete", + "url": "/accounts/:account_id", + "title": "Delete account", + "version": "1.0.0", + "name": "Delete_account", + "group": "Accounts", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The account to delete
" + } + ] + } + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "204": [ + { + "group": "204", + "optional": false, + "field": "-", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 204 No Content", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Accounts" + }, + { + "type": "get", + "url": "/accounts/:account_id", + "title": "Get account", + "version": "1.0.0", + "name": "Get_account", + "group": "Accounts", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The given account
" + } + ] + } + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "200": [ + { + "group": "200", + "type": "Object
", + "optional": false, + "field": "account", + "description": "The account with its (sub)categories.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Accounts" + }, + { + "type": "put", + "url": "/accounts/:account_id", + "title": "Modify account", + "version": "1.0.0", + "name": "Modify_account", + "group": "Accounts", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The account id to modify
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "name", + "description": "Name for the new account
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "reference", + "description": "A reference (bank account number) for the new account
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{\n name: 'Home',\n reference: '1234567890'\n}", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "The user can't be found.
" + } + ], + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"name\",\n \"rule\": \"required\",\n \"message\": \"Path `name` is required.\"\n }\n ]", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String
", + "optional": false, + "field": "username", + "description": "Username of the User.
" + }, + { + "group": "Success 200", + "type": "String
", + "optional": false, + "field": "token", + "description": "The JWT valid token.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Accounts" + }, + { + "type": "post", + "url": "/accounts/:account_id/entries", + "title": "Create entry", + "version": "1.0.0", + "name": "Create_entry", + "group": "Entries", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The account id to populate
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "amount", + "description": "Amount of the entry
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "date", + "description": "Date of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "category", + "description": "Category id of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "sub_category", + "description": "Sub category id of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "label", + "description": "A label for the entry
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n}", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "The user can't be found.
" + } + ], + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"amount\",\n \"rule\": \"required\",\n \"message\": \"Path `amount` is required.\"\n }\n ]", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "201": [ + { + "group": "201", + "type": "Object
", + "optional": false, + "field": "entry", + "description": "The created entry.
" + }, + { + "group": "201", + "type": "Object[]
", + "optional": false, + "field": "entries", + "description": "All account's entries
" + }, + { + "group": "201", + "type": "Number
", + "optional": false, + "field": "balance", + "description": "The account's total balance
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": " HTTP/1.1 201 Created\n{\n entry: {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n },\n entries: [\n {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n }\n ],\n balance: 1000\n}", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Entries" + }, + { + "type": "delete", + "url": "/accounts/:account_id/entries/:entry_id", + "title": "Delete entry", + "version": "1.0.0", + "name": "Delete_entry", + "group": "Entries", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The owner account
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "entry_id", + "description": "The entry to delete
" + } + ] + } + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + }, + { + "group": "404", + "type": "json
", + "optional": false, + "field": "EntryNotFound", + "description": "The entry can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found", + "type": "json" + } + ] + }, + "success": { + "fields": { + "204": [ + { + "group": "204", + "optional": false, + "field": "-", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 204 No Content", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Entries" + }, + { + "type": "post", + "url": "/accounts/:account_id/entries/:entry_id", + "title": "Modify entry", + "version": "1.0.0", + "name": "Modify_entry", + "group": "Entries", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The owner account
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "entry_id", + "description": "The entry to modify
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "amount", + "description": "Amount of the entry
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "date", + "description": "Date of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "category", + "description": "Category id of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "sub_category", + "description": "Sub category id of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "label", + "description": "A label for the entry
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n}", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "The user can't be found.
" + } + ], + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + }, + { + "group": "404", + "type": "json
", + "optional": false, + "field": "EntryNotFound", + "description": "The entry can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"amount\",\n \"rule\": \"required\",\n \"message\": \"Path `amount` is required.\"\n }\n ]", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found", + "type": "json" + } + ] + }, + "success": { + "fields": { + "200": [ + { + "group": "200", + "type": "Object
", + "optional": false, + "field": "entry", + "description": "The created entry.
" + }, + { + "group": "200", + "type": "Object[]
", + "optional": false, + "field": "entries", + "description": "All account's entries
" + }, + { + "group": "200", + "type": "Number
", + "optional": false, + "field": "balance", + "description": "The account's total balance
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": " HTTP/1.1 200 OK\n{\n entry: {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n },\n entries: [\n {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n }\n ],\n balance: 1000\n}", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Entries" + }, + { + "type": "post", + "url": "/users/login", + "title": "Login", + "version": "1.0.0", + "name": "Login", + "group": "Users", + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + } + ] + } + }, + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "username", + "description": "User's username
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "password", + "description": "User's password
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{ \n \"username\": \"John\", \n \"password\": \"s3cr3t\" \n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String
", + "optional": false, + "field": "username", + "description": "Username of the User.
" + }, + { + "group": "Success 200", + "type": "String
", + "optional": false, + "field": "token", + "description": "The JWT valid token.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"username\": \"John\",\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"\n}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + } + ] + }, + "filename": "app/routes/users.js", + "groupTitle": "Users" + }, + { + "type": "delete", + "url": "/users/login", + "title": "Logout", + "version": "1.0.0", + "name": "Logout", + "group": "Users", + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "success": { + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK", + "type": "json" + } + ] + }, + "filename": "app/routes/users.js", + "groupTitle": "Users" + }, + { + "type": "post", + "url": "/users", + "title": "Registration", + "version": "1.0.0", + "name": "Registration", + "group": "Users", + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + } + ] + } + }, + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "username", + "description": "User's username
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "password", + "description": "User's password
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "language", + "defaultValue": "en", + "description": "User's default language
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{ \n \"username\": \"John\", \n \"password\": \"s3cr3t\",\n \"language\": \"en\"\n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "201": [ + { + "group": "201", + "type": "String
", + "optional": false, + "field": "username", + "description": "Username of the User.
" + }, + { + "group": "201", + "type": "String
", + "optional": false, + "field": "token", + "description": "The JWT valid token.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 201 OK\n{\n \"username\": \"John\",\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"\n}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "Validation errors.
" + } + ], + "409": [ + { + "group": "409", + "type": "json
", + "optional": false, + "field": "UserAlreadyExist", + "description": "The user can't be found.
" + } + ] + }, + "examples": [ + { + "title": "UserAlreadyExist:", + "content": "HTTP/1.1 409 Not Found\n{\n \"message\": \"Account already exists\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n[\n {\n \"field\": \"password\",\n \"rule\": \"required\",\n \"message\": \"Path `password` is required.\"\n },\n {\n \"field\": \"username\",\n \"rule\": \"required\",\n \"message\": \"Path `username` is required.\"\n }\n ]", + "type": "json" + } + ] + }, + "filename": "app/routes/users.js", + "groupTitle": "Users" + }, + { + "type": "delete", + "url": "/users", + "title": "Unregistration", + "version": "1.0.0", + "name": "Unregistration", + "group": "Users", + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "success": { + "fields": { + "204": [ + { + "group": "204", + "optional": false, + "field": "-", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 204 No Content", + "type": "json" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + } + ] + }, + "filename": "app/routes/users.js", + "groupTitle": "Users" + } +] }); \ No newline at end of file diff --git a/public/api_data.json b/public/api_data.json new file mode 100644 index 0000000..be0c8c9 --- /dev/null +++ b/public/api_data.json @@ -0,0 +1,1279 @@ +[ + { + "type": "post", + "url": "/accounts", + "title": "Create account", + "version": "1.0.0", + "name": "Create_account", + "group": "Accounts", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "name", + "description": "Name for the new account
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "reference", + "description": "A reference (bank account number) for the new account
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{\n name: 'Home',\n reference: '1234567890'\n}", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "The user can't be found.
" + } + ], + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"name\",\n \"rule\": \"required\",\n \"message\": \"Path `name` is required.\"\n }\n ]", + "type": "json" + } + ] + }, + "success": { + "fields": { + "201": [ + { + "group": "201", + "type": "Object
", + "optional": false, + "field": "account", + "description": "The new account with its (sub)categories.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 201 Created\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Accounts" + }, + { + "type": "delete", + "url": "/accounts/:account_id", + "title": "Delete account", + "version": "1.0.0", + "name": "Delete_account", + "group": "Accounts", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The account to delete
" + } + ] + } + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "204": [ + { + "group": "204", + "optional": false, + "field": "-", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 204 No Content", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Accounts" + }, + { + "type": "get", + "url": "/accounts/:account_id", + "title": "Get account", + "version": "1.0.0", + "name": "Get_account", + "group": "Accounts", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The given account
" + } + ] + } + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "200": [ + { + "group": "200", + "type": "Object
", + "optional": false, + "field": "account", + "description": "The account with its (sub)categories.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Accounts" + }, + { + "type": "put", + "url": "/accounts/:account_id", + "title": "Modify account", + "version": "1.0.0", + "name": "Modify_account", + "group": "Accounts", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The account id to modify
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "name", + "description": "Name for the new account
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "reference", + "description": "A reference (bank account number) for the new account
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{\n name: 'Home',\n reference: '1234567890'\n}", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "The user can't be found.
" + } + ], + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"name\",\n \"rule\": \"required\",\n \"message\": \"Path `name` is required.\"\n }\n ]", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String
", + "optional": false, + "field": "username", + "description": "Username of the User.
" + }, + { + "group": "Success 200", + "type": "String
", + "optional": false, + "field": "token", + "description": "The JWT valid token.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Accounts" + }, + { + "type": "post", + "url": "/accounts/:account_id/entries", + "title": "Create entry", + "version": "1.0.0", + "name": "Create_entry", + "group": "Entries", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The account id to populate
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "amount", + "description": "Amount of the entry
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "date", + "description": "Date of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "category", + "description": "Category id of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "sub_category", + "description": "Sub category id of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "label", + "description": "A label for the entry
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n}", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "The user can't be found.
" + } + ], + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"amount\",\n \"rule\": \"required\",\n \"message\": \"Path `amount` is required.\"\n }\n ]", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "201": [ + { + "group": "201", + "type": "Object
", + "optional": false, + "field": "entry", + "description": "The created entry.
" + }, + { + "group": "201", + "type": "Object[]
", + "optional": false, + "field": "entries", + "description": "All account's entries
" + }, + { + "group": "201", + "type": "Number
", + "optional": false, + "field": "balance", + "description": "The account's total balance
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": " HTTP/1.1 201 Created\n{\n entry: {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n },\n entries: [\n {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n }\n ],\n balance: 1000\n}", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Entries" + }, + { + "type": "delete", + "url": "/accounts/:account_id/entries/:entry_id", + "title": "Delete entry", + "version": "1.0.0", + "name": "Delete_entry", + "group": "Entries", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The owner account
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "entry_id", + "description": "The entry to delete
" + } + ] + } + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + }, + { + "group": "404", + "type": "json
", + "optional": false, + "field": "EntryNotFound", + "description": "The entry can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found", + "type": "json" + } + ] + }, + "success": { + "fields": { + "204": [ + { + "group": "204", + "optional": false, + "field": "-", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 204 No Content", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Entries" + }, + { + "type": "post", + "url": "/accounts/:account_id/entries/:entry_id", + "title": "Modify entry", + "version": "1.0.0", + "name": "Modify_entry", + "group": "Entries", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "account_id", + "description": "The owner account
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "entry_id", + "description": "The entry to modify
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "amount", + "description": "Amount of the entry
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "date", + "description": "Date of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "category", + "description": "Category id of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "sub_category", + "description": "Sub category id of the bill/deposit
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "label", + "description": "A label for the entry
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n}", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "The user can't be found.
" + } + ], + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ], + "404": [ + { + "group": "404", + "type": "json
", + "optional": false, + "field": "AccountNotFound", + "description": "The account can't be found.
" + }, + { + "group": "404", + "type": "json
", + "optional": false, + "field": "EntryNotFound", + "description": "The entry can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"amount\",\n \"rule\": \"required\",\n \"message\": \"Path `amount` is required.\"\n }\n ]", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }", + "type": "json" + }, + { + "title": "AccountNotFound:", + "content": "HTTP/1.1 404 Not Found", + "type": "json" + } + ] + }, + "success": { + "fields": { + "200": [ + { + "group": "200", + "type": "Object
", + "optional": false, + "field": "entry", + "description": "The created entry.
" + }, + { + "group": "200", + "type": "Object[]
", + "optional": false, + "field": "entries", + "description": "All account's entries
" + }, + { + "group": "200", + "type": "Number
", + "optional": false, + "field": "balance", + "description": "The account's total balance
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": " HTTP/1.1 200 OK\n{\n entry: {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n },\n entries: [\n {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n }\n ],\n balance: 1000\n}", + "type": "json" + } + ] + }, + "filename": "app/routes/accounts.js", + "groupTitle": "Entries" + }, + { + "type": "post", + "url": "/users/login", + "title": "Login", + "version": "1.0.0", + "name": "Login", + "group": "Users", + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + } + ] + } + }, + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "username", + "description": "User's username
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "password", + "description": "User's password
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{ \n \"username\": \"John\", \n \"password\": \"s3cr3t\" \n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String
", + "optional": false, + "field": "username", + "description": "Username of the User.
" + }, + { + "group": "Success 200", + "type": "String
", + "optional": false, + "field": "token", + "description": "The JWT valid token.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"username\": \"John\",\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"\n}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + } + ] + }, + "filename": "app/routes/users.js", + "groupTitle": "Users" + }, + { + "type": "delete", + "url": "/users/login", + "title": "Logout", + "version": "1.0.0", + "name": "Logout", + "group": "Users", + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "success": { + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK", + "type": "json" + } + ] + }, + "filename": "app/routes/users.js", + "groupTitle": "Users" + }, + { + "type": "post", + "url": "/users", + "title": "Registration", + "version": "1.0.0", + "name": "Registration", + "group": "Users", + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + } + ] + } + }, + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "username", + "description": "User's username
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": false, + "field": "password", + "description": "User's password
" + }, + { + "group": "Parameter", + "type": "String
", + "optional": true, + "field": "language", + "defaultValue": "en", + "description": "User's default language
" + } + ] + }, + "examples": [ + { + "title": "Request-Example: ", + "content": "{ \n \"username\": \"John\", \n \"password\": \"s3cr3t\",\n \"language\": \"en\"\n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "201": [ + { + "group": "201", + "type": "String
", + "optional": false, + "field": "username", + "description": "Username of the User.
" + }, + { + "group": "201", + "type": "String
", + "optional": false, + "field": "token", + "description": "The JWT valid token.
" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 201 OK\n{\n \"username\": \"John\",\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"\n}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "400": [ + { + "group": "400", + "type": "json
", + "optional": false, + "field": "BadRequest", + "description": "Validation errors.
" + } + ], + "409": [ + { + "group": "409", + "type": "json
", + "optional": false, + "field": "UserAlreadyExist", + "description": "The user can't be found.
" + } + ] + }, + "examples": [ + { + "title": "UserAlreadyExist:", + "content": "HTTP/1.1 409 Not Found\n{\n \"message\": \"Account already exists\"\n}", + "type": "json" + }, + { + "title": "BadRequest:", + "content": "HTTP/1.1 400 Bad Request\n[\n {\n \"field\": \"password\",\n \"rule\": \"required\",\n \"message\": \"Path `password` is required.\"\n },\n {\n \"field\": \"username\",\n \"rule\": \"required\",\n \"message\": \"Path `username` is required.\"\n }\n ]", + "type": "json" + } + ] + }, + "filename": "app/routes/users.js", + "groupTitle": "Users" + }, + { + "type": "delete", + "url": "/users", + "title": "Unregistration", + "version": "1.0.0", + "name": "Unregistration", + "group": "Users", + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Content-Type", + "description": "application/json
" + }, + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "The valid JWT token provided by the {post} /users/login resource
" + } + ] + }, + "examples": [ + { + "title": "Authentication header example:", + "content": "{ \n \"Authentication\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\" \n }", + "type": "string" + } + ] + }, + "success": { + "fields": { + "204": [ + { + "group": "204", + "optional": false, + "field": "-", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 204 No Content", + "type": "json" + } + ] + }, + "error": { + "fields": { + "401": [ + { + "group": "401", + "type": "json
", + "optional": false, + "field": "AuthenticationFailed", + "description": "The user can't be found.
" + } + ] + }, + "examples": [ + { + "title": "AuthenticationFailed:", + "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}", + "type": "json" + } + ] + }, + "filename": "app/routes/users.js", + "groupTitle": "Users" + } +] \ No newline at end of file diff --git a/public/api_project.js b/public/api_project.js new file mode 100644 index 0000000..baec654 --- /dev/null +++ b/public/api_project.js @@ -0,0 +1,15 @@ +define({ + "name": "CloudBudget API", + "version": "1.0.0", + "description": "An API to manage CloudBudget", + "title": "CloudBudget API", + "url": "http://cloudbudget.pavnay.fr/api", + "sampleUrl": false, + "apidoc": "0.2.0", + "generator": { + "name": "apidoc", + "time": "2015-09-03T10:40:18.728Z", + "url": "http://apidocjs.com", + "version": "0.13.1" + } +}); \ No newline at end of file diff --git a/public/api_project.json b/public/api_project.json new file mode 100644 index 0000000..a200128 --- /dev/null +++ b/public/api_project.json @@ -0,0 +1,15 @@ +{ + "name": "CloudBudget API", + "version": "1.0.0", + "description": "An API to manage CloudBudget", + "title": "CloudBudget API", + "url": "http://cloudbudget.pavnay.fr/api", + "sampleUrl": false, + "apidoc": "0.2.0", + "generator": { + "name": "apidoc", + "time": "2015-09-03T10:40:18.728Z", + "url": "http://apidocjs.com", + "version": "0.13.1" + } +} \ No newline at end of file diff --git a/public/css/style.css b/public/css/style.css new file mode 100644 index 0000000..cdf5f0c --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,538 @@ +/* ------------------------------------------------------------------------------------------ + * Content + * ------------------------------------------------------------------------------------------ */ +body { + min-width: 980px; + max-width: 1280px; +} + +body, p, a, div, th, td { + font-family: "Source Sans Pro", sans-serif; + font-weight: 400; + font-size: 16px; +} + +td.code { + font-size: 14px; + font-family: "Source Code Pro"; + font-style: normal; + font-weight: 400; +} + +#content { + padding-top: 16px; + z-Index: -1; + margin-left: 270px; +} + +p { + color: #808080; +} + +h1 { + font-family: "Source Sans Pro Semibold", sans-serif; + font-weight: normal; + font-size: 44px; + line-height: 50px; + margin: 0 0 10px 0; + padding: 0; +} + +h2 { + font-family: "Source Sans Pro", sans-serif; + font-weight: normal; + font-size: 24px; + line-height: 40px; + margin: 0 0 20px 0; + padding: 0; +} + +section { + border-top: 1px solid #ebebeb; + padding: 30px 0; +} + +section h1 { + font-family: "Source Sans Pro", sans-serif; + font-weight: 700; + font-size: 32px; + line-height: 40px; + padding-bottom: 14px; + margin: 0 0 20px 0; + padding: 0; +} + +article { + padding: 14px 0 30px 0; +} + +article h1 { + font-family: "Source Sans Pro Bold", sans-serif; + font-weight: 600; + font-size: 24px; + line-height: 26px; +} + +article h2 { + font-family: "Source Sans Pro", sans-serif; + font-weight: 600; + font-size: 18px; + line-height: 24px; + margin: 0 0 10px 0; +} + +article h3 { + font-family: "Source Sans Pro", sans-serif; + font-weight: 600; + font-size: 16px; + line-height: 18px; + margin: 0 0 10px 0; +} + +article h4 { + font-family: "Source Sans Pro", sans-serif; + font-weight: 600; + font-size: 14px; + line-height: 16px; + margin: 0 0 8px 0; +} + +table { + border-collapse: collapse; + width: 100%; + margin: 0 0 20px 0; +} + +th { + background-color: #f5f5f5; + text-align: left; + font-family: "Source Sans Pro", sans-serif; + font-weight: 700; + padding: 4px 8px; + border: #e0e0e0 1px solid; +} + +td { + vertical-align: top; + padding: 2px 8px; + border: #e0e0e0 1px solid; +} + +#generator .content { + color: #b0b0b0; + border-top: 1px solid #ebebeb; + padding: 10px 0; +} + +.label-optional { + float: right; +} + +.open-left { + right: 0; + left: auto; +} + +/* ------------------------------------------------------------------------------------------ + * apidoc - intro + * ------------------------------------------------------------------------------------------ */ + +#apidoc .apidoc { + border-top: 1px solid #ebebeb; + padding: 30px 0; +} + +#apidoc h1 { + font-family: "Source Sans Pro", sans-serif; + font-weight: 700; + font-size: 32px; + line-height: 40px; + padding-bottom: 14px; + margin: 0 0 20px 0; + padding: 0; +} + +#apidoc h2 { + font-family: "Source Sans Pro Bold", sans-serif; + font-weight: 600; + font-size: 22px; + line-height: 26px; + padding-top: 14px; +} + +/* ------------------------------------------------------------------------------------------ + * pre / code + * ------------------------------------------------------------------------------------------ */ +pre { + background-color: #292b36; + color: #ffffff; + padding: 10px; + border-radius: 6px; + position: relative; + margin: 10px 0 20px 0; +} + +code.language-text { + word-wrap: break-word; +} + +pre.language-json { + overflow: auto; +} + +pre.language-html { + margin: 40px 0 20px 0; +} + +pre.language-html:before { + content: attr(data-type); + position: absolute; + top: -30px; + left: 0; + font-family: "Source Sans Pro", sans-serif; + font-weight: 600; + font-size: 15px; + display: inline-block; + padding: 2px 5px; + border-radius: 6px; + text-transform: uppercase; + background-color: #3387CC; + color: #ffffff; +} + +pre.language-html[data-type="get"]:before { + background-color: green; +} + +pre.language-html[data-type="put"]:before { + background-color: #e5c500; +} + +pre.language-html[data-type="post"]:before { + background-color: #4070ec; +} + +pre.language-html[data-type="delete"]:before { + background-color: #ed0039; +} + +pre.language-api .str { + color: #ffffff; +} + +pre.language-api .pln, +pre.language-api .pun { + color: #65B042; +} + +pre code { + display: block; + font-size: 14px; + font-family: "Source Code Pro"; + font-style: normal; + font-weight: 400; + word-wrap: normal; + white-space: pre; +} + +/* +pre.language-json { + background: #f5f5f5; + border: #e0e0e0 1px solid; +} + +pre.language-json .pln, +pre.language-json .pun { + color: #3a3a3a; +} +*/ + +/* ------------------------------------------------------------------------------------------ + * Sidenav + * ------------------------------------------------------------------------------------------ */ +.sidenav { + width: 228px; + margin: 0; + padding: 20px; + position: fixed; + top: 0; + left: 0; + bottom: 0; + overflow-x: hidden; + overflow-y: auto; + background-color: #f5f5f5; + z-index: 10; +} + +.sidenav > li > a { + display: block; + width: 192px; + margin: 0; + padding: 2px 11px; + border: 0; + border-left: transparent 4px solid; + border-right: transparent 4px solid; + font-family: "Source Sans Pro", sans-serif; + font-weight: 400; + font-size: 14px; +} + +.sidenav > li.nav-header > a { + padding: 5px 15px; + border: 1px solid #e5e5e5; + width: 190px; + font-family: "Source Sans Pro", sans-serif; + font-weight: 700; + font-size: 16px; + background-color: #ffffff; +} + +.sidenav > li.nav-header.active > a { + background-color: #0088cc; +} + +.sidenav > .active > a { + position: relative; + z-index: 2; +} + +.sidenav > li > a:hover { + background-color: #ffffff; +} + +.sidenav > li.has-modifications a { + border-right: #60d060 4px solid; +} + +.sidenav > li.is-new a { + border-left: #e5e5e5 4px solid; +} + +/* ------------------------------------------------------------------------------------------ + * Compare + * ------------------------------------------------------------------------------------------ */ + +ins { + background: #60d060; + text-decoration: none; + color: #000000; +} + +del { + background: #f05050; + color: #000000; +} + +.label-ins { + background-color: #60d060; +} + +.label-del { + background-color: #f05050; + text-decoration: line-through; +} + +pre.ins { + background-color: #60d060; +} + +pre.del { + background-color: #f05050; + text-decoration: line-through; +} + +table.ins th, +table.ins td { + background-color: #60d060; +} + +table.del th, +table.del td { + background-color: #f05050; + text-decoration: line-through; +} + +tr.ins td { + background-color: #60d060; +} + +tr.del td { + background-color: #f05050; + text-decoration: line-through; +} + +/* ------------------------------------------------------------------------------------------ + * Spinner + * ------------------------------------------------------------------------------------------ */ + +#loader { + position: absolute; + width: 100%; +} + +#loader p { + padding-top: 80px; + margin-left: -4px; +} + +.spinner { + margin: 200px auto; + width: 60px; + height: 60px; + position: relative; +} + +.container1 > div, .container2 > div, .container3 > div { + width: 14px; + height: 14px; + background-color: #0088cc; + + border-radius: 100%; + position: absolute; + -webkit-animation: bouncedelay 1.2s infinite ease-in-out; + animation: bouncedelay 1.2s infinite ease-in-out; + /* Prevent first frame from flickering when animation starts */ + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.spinner .spinner-container { + position: absolute; + width: 100%; + height: 100%; +} + +.container2 { + -webkit-transform: rotateZ(45deg); + transform: rotateZ(45deg); +} + +.container3 { + -webkit-transform: rotateZ(90deg); + transform: rotateZ(90deg); +} + +.circle1 { top: 0; left: 0; } +.circle2 { top: 0; right: 0; } +.circle3 { right: 0; bottom: 0; } +.circle4 { left: 0; bottom: 0; } + +.container2 .circle1 { + -webkit-animation-delay: -1.1s; + animation-delay: -1.1s; +} + +.container3 .circle1 { + -webkit-animation-delay: -1.0s; + animation-delay: -1.0s; +} + +.container1 .circle2 { + -webkit-animation-delay: -0.9s; + animation-delay: -0.9s; +} + +.container2 .circle2 { + -webkit-animation-delay: -0.8s; + animation-delay: -0.8s; +} + +.container3 .circle2 { + -webkit-animation-delay: -0.7s; + animation-delay: -0.7s; +} + +.container1 .circle3 { + -webkit-animation-delay: -0.6s; + animation-delay: -0.6s; +} + +.container2 .circle3 { + -webkit-animation-delay: -0.5s; + animation-delay: -0.5s; +} + +.container3 .circle3 { + -webkit-animation-delay: -0.4s; + animation-delay: -0.4s; +} + +.container1 .circle4 { + -webkit-animation-delay: -0.3s; + animation-delay: -0.3s; +} + +.container2 .circle4 { + -webkit-animation-delay: -0.2s; + animation-delay: -0.2s; +} + +.container3 .circle4 { + -webkit-animation-delay: -0.1s; + animation-delay: -0.1s; +} + +@-webkit-keyframes bouncedelay { + 0%, 80%, 100% { -webkit-transform: scale(0.0) } + 40% { -webkit-transform: scale(1.0) } +} + +@keyframes bouncedelay { + 0%, 80%, 100% { + transform: scale(0.0); + -webkit-transform: scale(0.0); + } 40% { + transform: scale(1.0); + -webkit-transform: scale(1.0); + } +} + +/* ------------------------------------------------------------------------------------------ + * Tabs + * ------------------------------------------------------------------------------------------ */ +ul.nav-tabs { + margin: 0; +} + +/* ------------------------------------------------------------------------------------------ + * Print + * ------------------------------------------------------------------------------------------ */ + +@media print { + + #sidenav, + #version, + #versions, + section .version, + section .versions { + display: none; + } + + #content { + margin-left: 0; + } + + a { + text-decoration: none; + color: inherit; + } + + a:after { + content: " [" attr(href) "] "; + } + + p { + color: #000000 + } + + pre { + background-color: #ffffff; + color: #000000; + padding: 10px; + border: #808080 1px solid; + border-radius: 6px; + position: relative; + margin: 10px 0 20px 0; + } + +} /* /@media print */ diff --git a/public/img/favicon.ico b/public/img/favicon.ico new file mode 100644 index 0000000..c307a04 Binary files /dev/null and b/public/img/favicon.ico differ diff --git a/public/img/glyphicons-halflings-white.png b/public/img/glyphicons-halflings-white.png new file mode 100644 index 0000000..3bf6484 Binary files /dev/null and b/public/img/glyphicons-halflings-white.png differ diff --git a/public/img/glyphicons-halflings.png b/public/img/glyphicons-halflings.png new file mode 100644 index 0000000..a996999 Binary files /dev/null and b/public/img/glyphicons-halflings.png differ diff --git a/public/index.html b/public/index.html index 8701cb7..8a2b95d 100644 --- a/public/index.html +++ b/public/index.html @@ -1,4 +1,658 @@ + - - Work in progress - \ No newline at end of file + +Loading...
+