express-api-example/docs/api_data.js

447 lines
11 KiB
JavaScript

define({ "api": [
{
"type": "post",
"url": "/auth/login",
"title": "Get access token",
"name": "Login",
"group": "Auth",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "email",
"description": "<p>email of the user.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>password of the user.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "access_token",
"description": "<p>Access token.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/auth/index.js",
"groupTitle": "Auth"
},
{
"type": "post",
"url": "/auth/register",
"title": "Register",
"name": "Register",
"group": "Auth",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "firstname",
"description": "<p>Firstname of the user.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "lastname",
"description": "<p>Lastname of the user.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "email",
"description": "<p>email of the user.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>password of the user.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Array",
"optional": false,
"field": "Array",
"description": "<p>Array of Note objects.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/auth/index.js",
"groupTitle": "Auth"
},
{
"type": "post",
"url": "/auth/reset-password",
"title": "Reset password",
"name": "ResetPass",
"group": "Auth",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "email",
"description": "<p>email of the user.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>password of the user.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/auth/index.js",
"groupTitle": "Auth"
},
{
"type": "post",
"url": "/note",
"title": "Create note",
"name": "CreateNote",
"group": "Note",
"header": {
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"Authorization\": \"<Access_Token>\"\n}",
"type": "json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "title",
"description": "<p>Title of the note.</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "text",
"description": "<p>Text of the note.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/note/index.js",
"groupTitle": "Note"
},
{
"type": "delete",
"url": "/note/:id",
"title": "Delete note",
"name": "DeleteNote",
"group": "Note",
"success": {
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"message\": \"Note successfully deleted.\"\n}",
"type": "json"
}
]
},
"error": {
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 403 Forbidden\n{\n \"success\": false,\n \"message\": \"Access forbidden.\",\n \"errors\": []\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Note unique ID.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/note/index.js",
"groupTitle": "Note"
},
{
"type": "get",
"url": "/note/:id",
"title": "Get note",
"name": "GetNotes",
"group": "Note",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Note unique ID.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "title",
"description": "<p>Title of the note.</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "text",
"description": "<p>Text of the note.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/note/index.js",
"groupTitle": "Note"
},
{
"type": "put",
"url": "/note/:id",
"title": "Update note",
"name": "UpdateNote",
"group": "Note",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Note unique ID.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "title",
"description": "<p>Title of the note.</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "text",
"description": "<p>Text of the note.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/note/index.js",
"groupTitle": "Note"
},
{
"type": "delete",
"url": "/user/me",
"title": "Delete account",
"name": "DeleteUser",
"group": "User",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "Password",
"description": "<p>Account password.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/user/index.js",
"groupTitle": "User"
},
{
"type": "get",
"url": "/user/me",
"title": "Get account information",
"name": "GetUser",
"group": "User",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "firstname",
"description": "<p>Firstname of the User.</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "lastname",
"description": "<p>Lastname of the User.</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "email",
"description": "<p>Email of the User.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/user/index.js",
"groupTitle": "User"
},
{
"type": "put",
"url": "/user/me",
"title": "Update account information",
"name": "UpdateUser",
"group": "User",
"description": "<p>Send only password and new_password to change the password. Otherwise they will be ignored.</p>",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "firstname",
"description": "<p>New firstname. (optional)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "lastname",
"description": "<p>New lastname. (optional)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "email",
"description": "<p>New email address. (optional)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>Actual password. (optional)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "new_password",
"description": "<p>New password (only if you passed password parameter).</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "user",
"description": "<p>User object.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/user/index.js",
"groupTitle": "User"
},
{
"type": "get",
"url": "/user/me/notes",
"title": "Get all notes",
"name": "GetNotesByUserId",
"group": "User_notes",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Array",
"optional": false,
"field": "Array",
"description": "<p>Notes of the user.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "app/routes/user/index.js",
"groupTitle": "User_notes"
}
] });