docs
This commit is contained in:
@@ -4,7 +4,7 @@ import multipart from 'connect-multiparty';
|
||||
const multipartMiddleware = multipart();
|
||||
|
||||
/**
|
||||
* GameObjectsController. API for the game objects manager
|
||||
* GameObjectsController. API for the game objects manager, граничен клас за комуникация с модула за игрови обекти
|
||||
*/
|
||||
class GameObjectsController{
|
||||
|
||||
@@ -12,15 +12,15 @@ class GameObjectsController{
|
||||
route = '/api/game-object'
|
||||
|
||||
/**
|
||||
* Initializes the GameObjectsController plugin
|
||||
* @param {App} app The application instance
|
||||
* Initializes the GameObjectsController plugin, инициализация
|
||||
* @param {App} app The application instance, апликация
|
||||
*/
|
||||
init(app){
|
||||
const { gameObject } = app;
|
||||
const router = express.Router();
|
||||
|
||||
/**
|
||||
* API: PUT /api/game-object/ Create or update game object
|
||||
* API: PUT /api/game-object/ Create or update game object, създаване или обновяване на игрови обект
|
||||
* @function createOrUpdate
|
||||
* @memberof GameObjectsController
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ class GameObjectsController{
|
||||
});
|
||||
|
||||
/**
|
||||
* API: POST /api/game-object/ List game objects by given criteria
|
||||
* API: POST /api/game-object/ List game objects by given criteria, търсене на обекти по критерии
|
||||
* @function list
|
||||
* @returns {GameObject[]}
|
||||
* @memberof GameObjectsController
|
||||
@@ -47,9 +47,9 @@ class GameObjectsController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: GET /api/game-object/:id Retrieve game object by ID
|
||||
* API: GET /api/game-object/:id Retrieve game object by ID, извличане на обект по идентификатор
|
||||
* @function read
|
||||
* @param {string} id The id of the game object
|
||||
* @param {string} id The id of the game object, идентификатор на обекта
|
||||
* @returns {GameObject}
|
||||
* @memberof GameObjectsController
|
||||
*/
|
||||
@@ -59,9 +59,9 @@ class GameObjectsController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: DELETE /api/game-object/:id Delete game object by ID
|
||||
* API: DELETE /api/game-object/:id Delete game object by ID, изтриване на обект по даден идентификатор
|
||||
* @function remove
|
||||
* @param {string} id The id of the game object
|
||||
* @param {string} id The id of the game object, идентификатор на обекта
|
||||
* @memberof GameObjectsController
|
||||
*/
|
||||
router.delete('/:id', async (req, res)=>{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import express from 'express';
|
||||
|
||||
/**
|
||||
* GamesController. API for the games manager
|
||||
* GamesController. API for the games manager, граничен клас за комуникация с модула за игрови дефиниции
|
||||
*/
|
||||
class GamesController{
|
||||
|
||||
@@ -9,15 +9,15 @@ class GamesController{
|
||||
route = '/api/game'
|
||||
|
||||
/**
|
||||
* Initializes the GamesController plugin
|
||||
* @param {App} app The application instance
|
||||
* Initializes the GamesController plugin, инициализация
|
||||
* @param {App} app The application instance, апликация
|
||||
*/
|
||||
init(app){
|
||||
const router = express.Router();
|
||||
const { games } = app;
|
||||
|
||||
/**
|
||||
* API: PUT /api/game/ Create or update game
|
||||
* API: PUT /api/game/ Create or update game, създаване/обновяване на игрова дефиниция
|
||||
* @function createOrUpdate
|
||||
* @memberof GamesController
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ class GamesController{
|
||||
});
|
||||
|
||||
/**
|
||||
* API: POST /api/game/ List games by given criteria
|
||||
* API: POST /api/game/ List games by given criteria, търсене в игрови дефиниции
|
||||
* @function list
|
||||
* @returns {Game[]}
|
||||
* @memberof GamesController
|
||||
@@ -35,9 +35,9 @@ class GamesController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: GET /api/game/:id Retrieve game by ID
|
||||
* API: GET /api/game/:id Retrieve game by ID, извличане на игрова дефиниция
|
||||
* @function read
|
||||
* @param {string} id The id of the game
|
||||
* @param {string} id The id of the game, идентификатор на дефиницията
|
||||
* @returns {Game}
|
||||
* @memberof GamesController
|
||||
*/
|
||||
@@ -45,9 +45,9 @@ class GamesController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: DELETE /api/game/:id Delete game by ID
|
||||
* API: DELETE /api/game/:id Delete game by ID, изтриване на игрова дефиниция
|
||||
* @function remove
|
||||
* @param {string} id The id of the game
|
||||
* @param {string} id The id of the game, идентификатор на дефиницията
|
||||
* @memberof GamesController
|
||||
*/
|
||||
router.delete('/:id', async (req, res)=>{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import express from 'express';
|
||||
|
||||
/**
|
||||
* RulesController. API for the game rules manager
|
||||
* RulesController. API for the game rules manager, граничен клас за комуникация с модула за игрови правила
|
||||
*/
|
||||
class RulesController{
|
||||
|
||||
@@ -9,15 +9,15 @@ class RulesController{
|
||||
route = '/api/rule'
|
||||
|
||||
/**
|
||||
* Initializes the RulesController plugin
|
||||
* @param {App} app The application instance
|
||||
* Initializes the RulesController plugin, инициализация
|
||||
* @param {App} app The application instance, апликация
|
||||
*/
|
||||
init(app){
|
||||
const router = express.Router();
|
||||
const { rules } = app;
|
||||
|
||||
/**
|
||||
* API: PUT /api/rule/ Create or update rule
|
||||
* API: PUT /api/rule/ Create or update rule, създаване/обновяване на игрово правило
|
||||
* @function createOrUpdate
|
||||
* @memberof RulesController
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ class RulesController{
|
||||
});
|
||||
|
||||
/**
|
||||
* API: POST /api/rule/ List rules by given criteria
|
||||
* API: POST /api/rule/ List rules by given criteria, търсене в игровите правила
|
||||
* @function list
|
||||
* @returns {Rule[]}
|
||||
* @memberof RulesController
|
||||
@@ -35,9 +35,9 @@ class RulesController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: GET /api/rule/:id Retrieve rule by ID
|
||||
* API: GET /api/rule/:id Retrieve rule by ID, извличане на игрово правило
|
||||
* @function read
|
||||
* @param {string} id The id of the rule
|
||||
* @param {string} id The id of the rule, идентификатор
|
||||
* @returns {Rule}
|
||||
* @memberof RulesController
|
||||
*/
|
||||
@@ -45,9 +45,9 @@ class RulesController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: DELETE /api/rule/:id Delete rule by ID
|
||||
* API: DELETE /api/rule/:id Delete rule by ID, изтриване на игрово правило
|
||||
* @function remove
|
||||
* @param {string} id The id of the rule
|
||||
* @param {string} id The id of the rule, идентификатор
|
||||
* @memberof RulesController
|
||||
*/
|
||||
router.delete('/:id', async (req, res)=>{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import express from 'express';
|
||||
|
||||
/**
|
||||
* ScenariosController. API for the scenarios manager
|
||||
* ScenariosController. API for the scenarios manager, граничен клас за комуникация с модула за игрови сценарии
|
||||
*/
|
||||
class ScenariosController{
|
||||
|
||||
@@ -9,15 +9,15 @@ class ScenariosController{
|
||||
route = '/api/scenario'
|
||||
|
||||
/**
|
||||
* Initializes the ScenariosController plugin
|
||||
* @param {App} app The application instance
|
||||
* Initializes the ScenariosController plugin, инициализация
|
||||
* @param {App} app The application instance, апликация
|
||||
*/
|
||||
init(app){
|
||||
const router = express.Router();
|
||||
const { scenarios } = app;
|
||||
|
||||
/**
|
||||
* API: PUT /api/scenario/ Create or update scenario
|
||||
* API: PUT /api/scenario/ Create or update scenario, създаване/обновяване на игрови сценарий
|
||||
* @function createOrUpdate
|
||||
* @memberof ScenariosController
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ class ScenariosController{
|
||||
});
|
||||
|
||||
/**
|
||||
* API: POST /api/scenario/ List scenarios by given criteria
|
||||
* API: POST /api/scenario/ List scenarios by given criteria, търсене в игровите сценарии
|
||||
* @function list
|
||||
* @returns {Scenario[]}
|
||||
* @memberof ScenariosController
|
||||
@@ -35,9 +35,9 @@ class ScenariosController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: GET /api/scenario/:id Retrieve scenario by ID
|
||||
* API: GET /api/scenario/:id Retrieve scenario by ID, извличане на игрови сценарий
|
||||
* @function read
|
||||
* @param {string} id The id of the scenario
|
||||
* @param {string} id The id of the scenario, идентификатор
|
||||
* @returns {Scenario}
|
||||
* @memberof ScenariosController
|
||||
*/
|
||||
@@ -45,9 +45,9 @@ class ScenariosController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: DELETE /api/scenario/:id Delete scenario by ID
|
||||
* API: DELETE /api/scenario/:id Delete scenario by ID, изтриване на игрови сценарий
|
||||
* @function remove
|
||||
* @param {string} id The id of the scenario
|
||||
* @param {string} id The id of the scenario, идентификатор
|
||||
* @memberof ScenariosController
|
||||
*/
|
||||
router.delete('/:id', async (req, res)=>{
|
||||
|
||||
Reference in New Issue
Block a user