Compare commits

..

No commits in common. "14b3d7c4eecfa022d61d0b72f64ea8ab180be037" and "74b1b587a6972319be2860f67870d6688aefd18b" have entirely different histories.

28 changed files with 1009 additions and 247 deletions

View File

@ -1,7 +1,7 @@
### Get Army Overview [GET /overview] ### GET Army Overview [GET /overview]
Get bundled army, squad and member data for the participating fractions Get bundled army, squad and member data for the participating fractions
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (ArmyOverview) + Attributes (ArmyOverview)

View File

@ -20,9 +20,9 @@ List all awardings
+ `GLOBAL` + `GLOBAL`
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (array[AwardingPopulated], fixed-type) + Attributes (array[Awarding], fixed-type)
### Create Awarding [POST /awardings] ### Create Awarding [POST /awardings]
@ -38,7 +38,7 @@ Create a new awarding which is immediatly assigned to the user
+ reason: `Good boy` (string, required) - reason for giving the awarding + reason: `Good boy` (string, required) - reason for giving the awarding
+ proposer: `5ab68ceef547ed304064e5f6` (string, required) - app user id, who requested this awarding + proposer: `5ab68ceef547ed304064e5f6` (string, required) - app user id, who requested this awarding
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (Awarding, fixed-type) + Attributes (Awarding, fixed-type)
@ -55,6 +55,6 @@ Create a new awarding proposal, that needs to be approved by higher permission l
+ decorationId: `5abd3dff6e6a0334d95b8ba0` (string, required) - unique id of the decoration + decorationId: `5abd3dff6e6a0334d95b8ba0` (string, required) - unique id of the decoration
+ reason: `Good boy` (string, required) - reason for giving the awarding + reason: `Good boy` (string, required) - reason for giving the awarding
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (Awarding, fixed-type) + Attributes (Awarding, fixed-type)

View File

@ -1,4 +1,4 @@
### List Decorations [GET /decorations{?q,fractFilter}] ### GET Decorations [GET /decorations{?q,fractFilter}]
List all decorations List all decorations
@ -14,19 +14,19 @@ List all decorations
+ `OPFOR` + `OPFOR`
+ `GLOBAL` + `GLOBAL`
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (array[Decoration], fixed-type) + Attributes (array[Decoration], fixed-type)
### Get Decoration [GET /decorations/{id}] ### GET Decoration [GET /decorations/{id}]
Retrieve single decoration data Retrieve single decoration data
+ Parameters + Parameters
+ id: `5abd3dff6e6a0334d95b8ba0` (string, required) - unique id of the decoration to fetch + id: `5abd3dff6e6a0334d95b8ba0` (string, required) - unique id of the decoration to fetch
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (Decoration, fixed-type) + Attributes (Decoration, fixed-type)
@ -65,7 +65,7 @@ Create a new decoration
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII= QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
-----BOUNDARY-- -----BOUNDARY--
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (Decoration, fixed-type) + Attributes (Decoration, fixed-type)
@ -107,7 +107,7 @@ Update decoration, identified by its id
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII= QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
-----BOUNDARY-- -----BOUNDARY--
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (Decoration, fixed-type) + Attributes (Decoration, fixed-type)

View File

@ -1,4 +1,4 @@
### List Promotions [GET /request/promotion{?squadId,inProgress,fractFilter}] ### GET Promotions [GET /promotion{?squadId,inProgress,fractFilter}]
List all promotion requests List all promotion requests
@ -19,9 +19,9 @@ List all promotion requests
+ `OPFOR` + `OPFOR`
+ `GLOBAL` + `GLOBAL`
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (array[PromotionPopulated]) + Attributes (array[Promotion])
### Create Promotion Proposal [POST /request/promotion] ### Create Promotion Proposal [POST /request/promotion]
@ -36,7 +36,7 @@ Create a new proposal for a promotion, that needs to be approved by higher permi
+ oldRankLvl: 0 (number, required) - previous rank level + oldRankLvl: 0 (number, required) - previous rank level
+ newRankLvl: 5 (number, required) - new rank level to apply + newRankLvl: 5 (number, required) - new rank level to apply
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (Promotion, fixed-type) + Attributes (Promotion, fixed-type)
@ -60,6 +60,6 @@ Update the promotion proposal
+ newRankLvl: 5 (number, optional) - new rank level to apply + newRankLvl: 5 (number, optional) - new rank level to apply
+ confirmed: 1 (number, optional) confirmation status of the promotion (0 - in progress, 1 - approved & applied, 2 - rejected) \nThis automatically applies the *newRankLvl*value as new rank level to the target user when confirmed = 1 + confirmed: 1 (number, optional) confirmation status of the promotion (0 - in progress, 1 - approved & applied, 2 - rejected) \nThis automatically applies the *newRankLvl*value as new rank level to the target user when confirmed = 1
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (Promotion, fixed-type) + Attributes (Promotion, fixed-type)

View File

@ -1,4 +1,4 @@
### List Ranks [GET /ranks{?q,fractFilter}] ### GET Ranks [GET /ranks{?q,fractFilter}]
List all ranks List all ranks
@ -13,19 +13,19 @@ List all ranks
+ `OPFOR` + `OPFOR`
+ `GLOBAL` + `GLOBAL`
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (array[Rank], fixed-type) + Attributes (array[Rank], fixed-type)
### Get Rank [GET /ranks/{id}] ### GET Rank [GET /ranks/{id}]
Retrieve single rank data Retrieve single rank data
+ Parameters + Parameters
+ id: `5aba5504eadcce6332c6a775` (string, required) - unique id of the rank to fetch + id: `5aba5504eadcce6332c6a775` (string, required) - unique id of the rank to fetch
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (Rank, fixed-type) + Attributes (Rank, fixed-type)
@ -59,7 +59,7 @@ Create a new rank
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII= QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
-----BOUNDARY-- -----BOUNDARY--
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (Rank, fixed-type) + Attributes (Rank, fixed-type)
@ -96,7 +96,7 @@ Update rank, identified by its id
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII= QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
-----BOUNDARY-- -----BOUNDARY--
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (Rank, fixed-type) + Attributes (Rank, fixed-type)

View File

@ -1,4 +1,4 @@
### List Squads [GET /squads{?q,fractFilter}] ### Get Squads [GET /squads{?q,fractFilter}]
Get single army member information Get single army member information
@ -13,7 +13,7 @@ Get single army member information
+ `OPFOR` + `OPFOR`
+ `GLOBAL` + `GLOBAL`
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (array[Squad], fixed-type) + Attributes (array[Squad], fixed-type)
@ -24,7 +24,7 @@ Get single squad information
+ Parameters + Parameters
+ id: `5aba54eaeadcce6332c6a774` (string, required) - unique id of the squad + id: `5aba54eaeadcce6332c6a774` (string, required) - unique id of the squad
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (Squad, fixed-type) + Attributes (Squad, fixed-type)
@ -53,7 +53,7 @@ Create a new squad
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII= QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
-----BOUNDARY-- -----BOUNDARY--
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (Squad, fixed-type) + Attributes (Squad, fixed-type)
@ -90,7 +90,7 @@ Update squad, identified by its id
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII= QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
-----BOUNDARY-- -----BOUNDARY--
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (Squad, fixed-type) + Attributes (Squad, fixed-type)

View File

@ -1,4 +1,4 @@
### List Users [GET /users{?q,fractFilter,limit,offset}] ### Get Users [GET /users{?q,fractFilter,limit,offset}]
Get single army member information Get single army member information
@ -23,13 +23,13 @@ Get single army member information
+ Default: 0 + Default: 0
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Headers + Headers
X-Total-Count: 1 X-Total-Count: 1
+ Attributes (array[UserPopulated], fixed-type) + Attributes (array[User], fixed-type)
### Get User [GET /users/{id}] ### Get User [GET /users/{id}]
@ -39,9 +39,9 @@ Get single army member information
+ Parameters + Parameters
+ id: `5ab68d42f547ed304064e5f7` (string, required) - unique id of army-member + id: `5ab68d42f547ed304064e5f7` (string, required) - unique id of army-member
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (UserPopulated, fixed-type) + Attributes (User, fixed-type)
### Create User [POST /users] ### Create User [POST /users]
@ -53,9 +53,9 @@ Create a new army member
+ Attributes + Attributes
+ username: `[GNC]Paolo` (string, required) - display name of the user + username: `[GNC]Paolo` (string, required) - display name of the user
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (UserInclTimestamp, fixed-type) + Attributes (User, fixed-type)
### Update User [PUT /users/{id}] ### Update User [PUT /users/{id}]
@ -72,7 +72,7 @@ Update an army member, identified by its id
+ rankLvl: 22 (number, optional) - rank level representing the rank + rankLvl: 22 (number, optional) - rank level representing the rank
+ squadId: `591470249e9fae286e008e31` (string, optional) - squadId of squad which army member is part of + squadId: `591470249e9fae286e008e31` (string, optional) - squadId of squad which army member is part of
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (User, fixed-type) + Attributes (User, fixed-type)

View File

@ -6,6 +6,6 @@ Generate a token which can be used to make API requests.
+ Attributes (Login) + Attributes (Login)
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (LoginResponse) + Attributes (LoginResponse)

View File

@ -6,8 +6,4 @@ Create a new application user account.
+ Attributes (Registration) + Attributes (Registration)
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes
+ message: `User successfully created` (string, required)

View File

@ -13,9 +13,9 @@ Response object on successful token creation
+ _id: `593d632772d35225232bcabb` (string, required) - the unique id of the app-user + _id: `593d632772d35225232bcabb` (string, required) - the unique id of the app-user
+ username: `kallek` (string, required) - the username of the app-user + username: `kallek` (string, required) - the username of the app-user
+ permission: 3 (number, required)- the permission level of the app-user (0 - user, 1 - sql, 2 - hl, 3 - maintainer, 4 - admin) + permission: 3 - the permission level of the app-user (0 - user, 1 - sql, 2 - hl, 3 - maintainer, 4 - admin)
+ squad (Squad, required) - squad the app-user is member of + squad (Squad, required) - squad the app-user is member of
+ token: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1OTNkNWUzZjcyZDM1MjI1MjIyYmNhYmEiLCJpYXQiOjE1MjEzOTQ5NDYsImV4cCI6MTUyMzgxNDE0Nn0.vOAwA5--qrx8BglhyGZWVYx7LeuRKOHH0NQXmHFNhIQ` (string,required) - generated access token + token: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1OTNkNWUzZjcyZDM1MjI1MjIyYmNhYmEiLCJpYXQiOjE1MjEzOTQ5NDYsImV4cCI6MTUyMzgxNDE0Nn0.vOAwA5--qrx8BglhyGZWVYx7LeuRKOHH0NQXmHFNhIQ` (string,required) - generated token
+ tokenExpireDate: `2018-04-15T17:42:25.050Z` (string,required) - expiration date of the token + tokenExpireDate: `2018-04-15T17:42:25.050Z` (string,required) - expiration date of the token

View File

@ -2,21 +2,13 @@
Awarding associating a decoration to a user Awarding associating a decoration to a user
## Properties ## Properties
+ _id: `591ca81c1ee62711cfc19002` (string, required) - unique id of the awarding + _id:`591ca81c1ee62711cfc19002` (string, required) - unique id of the awarding
+ confirmed: 1 (number, required) - status of the awarding request (0 - in progress, 1 - approved, 2 - rejected) + confirmed: 1 (number, required) - status of the awarding request (0 - in progress, 1 - approved, 2 - rejected)
+ date: `2017-05-17T19:44:24.926Z` (string, required) - date when the awarding was requested + date: `2017-05-17T19:44:24.926Z` (string, required) - date when the awarding was requested
+ decorationId: `591c81981ee62711cfc18f4a` (string, required) - id of decoration that is given with the awarding + decorationId (Decoration, required) - populated decoration object that is given with the awarding
+ reason: `war dabei` (string, required) - reason for giving the awarding + reason: `war dabei` (string, required) - reason for giving the awarding
+ proposer: 593d5e3f72d35225222bcaba (string, required) - id of app user who requested this awarding + proposer (Proposer, required) - app user who requested this awarding, null if awarding was given directly
+ timestamp: `2017-05-17T19:44:28.751Z` (string, required) - creation date + timestamp: `2017-05-17T19:44:28.751Z` (string, required) - creation date
+ updatedAt: `"2017-05-17T19:44:28.751Z` (string, required) - version date + updatedAt: `"2017-05-17T19:44:28.751Z` (string, required) - version date
+ userId: `5918d2ca574b0b1d820a0b24` (string, required) - the unique id of the user who got this awarding + userId: `5918d2ca574b0b1d820a0b24` (string, required) - the unique id of the user who got this awarding
+ __v: 0 (number, required) - version number + __v: 0 (number, required) - version number
# AwardingPopulated (Awarding)
Awarding with populated decoration and proposer
## Properties
+ proposer (Proposer, required) - app user who requested this awarding
+ decorationId (Decoration, required) - populated decoration object that is given with the awarding

View File

@ -7,10 +7,3 @@ Campaign entity
+ timestamp: `2017-05-17T19:44:28.751Z` (string, required) - creation date + timestamp: `2017-05-17T19:44:28.751Z` (string, required) - creation date
+ updatedAt: `"2017-05-17T19:44:28.751Z` (string, required) - version date + updatedAt: `"2017-05-17T19:44:28.751Z` (string, required) - version date
+ __v: 0 (number, required) - version number + __v: 0 (number, required) - version number
#WarCampaign (object)
Cmpaign entity with attached War collection
## Properties
+ _id: `5abd55ea9e30a76bfef747d6` (string, required) - unique id of the campaign
+ title: `Ein Kessel Buntes` (string, required) - display title of the campaign
+ wars (array[WarWithPlayers], requied)

View File

@ -1,79 +0,0 @@
# Log (object)
## Properties
+ _id: `` (string, required) - log entry id
+ war: `` (string, required) - warId
+ time: `` (string, required) - logging timestamp
+ __v: 0 (number, required) - object version number
# LogPoints (Log)
## Properties
+ ptBlufor: 2 (number, required) -
+ ptOpfor: 4 (number, required) -
+ fraction: `OPFOR` (enum, required)
+ Members
+ `BLUFOR`
+ `OPFOR`
+ `NONE`
#LogBudget (Log)
## Properties
+ oldBudget: 400000 (number, required)
+ newBudget: 380000 (number, required)
+ fraction: `BLUFOR` (enum, required)
+ Members
+ `BLUFOR`
+ `OPFOR`
#LogFlag (Log)
## Properties
+ player: `HardiReady` (string, required)
+ capture: true (boolean, required)
+ flagFraction: `BLUFOR` (enum, required)
+ Members
+ `BLUFOR`
+ `OPFOR`
#LogKill (Log)
## Properties
+ shooter: `HardiReady` (string, required)
+ target: `KalleK` (string, required)
+ friendlyFire: true (boolean, required)
+ fraction: `BLUFOR` (enum, required)
+ Members
+ `BLUFOR`
+ `OPFOR`
+ `NONE`
#LogRespawn (Log)
## Properties
+ player: `radical1976` (string, required)
#LogRevive (Log)
## Properties
+ medic: `radical1976` (string, required)
+ patient: `radical1976` (string, required)
+ stabilized: false (boolean, required)
+ flagFraction: `BLUFOR` (enum, required)
+ Members
+ `BLUFOR`
+ `OPFOR`
#LogTransport (Log)
## Properties
+ driver: `radical1976` (string, required)
+ passenger: `radical1976` (string, required)
+ distance: 2435 (number, required)
+ flagFraction: `BLUFOR` (enum, required)
+ Members
+ `BLUFOR`
+ `OPFOR`
#LogVehicle (Log)
## Properties
+ shooter: `HardiReady` (string, required)
+ target: `Murda]X[` (string, required)
+ fraction: `BLUFOR` (enum, required)
+ Members
+ `BLUFOR`
+ `OPFOR`
+ `NONE`

View File

@ -14,7 +14,7 @@ Basic player statistic information object
+ revive: 0 (number, required) - sum of revives + revive: 0 (number, required) - sum of revives
# WarPlayer (BasicPlayer) # CampaignPlayer (BasicPlayer)
A player campaign statistics object A player campaign statistics object
## Properties ## Properties

View File

@ -4,17 +4,10 @@ Representation of a promotion request for a army member
## Properties ## Properties
+ _id: `5as7d05dcb90ce4da68c4f5f` (string, required) - unique id of the promotion request + _id: `5as7d05dcb90ce4da68c4f5f` (string, required) - unique id of the promotion request
+ confirmed: 0 (number, required) - number representing status of the promotion (0 - in progress, 1 - approved, 2 - rejected) + confirmed: 0 (number, required) - number representing status of the promotion (0 - in progress, 1 - approved, 2 - rejected)
+ newRankLvl: 14 (number, required)- new rank level that is requested in this promotion + newRankLvl: 14 - new rank level that is requested in this promotion
+ oldRankLvl: 10 (number, required)- old rank level of the user + oldRankLvl: 10 - old rank level of the user
+ proposer: `5abf5064861d950f157c4a09` (string, required) - id of app user who requested the promotion + proposer (Proposer, required) - app user who requested the promotion
+ timestamp: `2018-03-25T18:54:21.609Z` (string, required) - creation timestamp + timestamp: `2018-03-25T18:54:21.609Z` (string, required) - creation timestamp
+ updatedAt: `2018-03-25T18:54:21.609Z` (string, required) - version timestamp + updatedAt: `2018-03-25T18:54:21.609Z` (string, required) - version timestamp
+ userId: `5ab68d42f547ed304064e5f7` (string, required) - id of army member the promotion is requested for
+ __v: 0 (number, required) - version number of promotion instance
# PromotionPopulated (object)
Promotion with populated proposer and army member
## Properties
+ proposer (Proposer, required) - app user who requested the promotion
+ userId (User, required) - populated user instance of user the promotion is requested for + userId (User, required) - populated user instance of user the promotion is requested for
+ __v: 0 (number, required) - version number of promotion instance

View File

@ -4,13 +4,13 @@ A rank that can be applied to army members by level/fraction
## Properties ## Properties
+ _id: `591469c9ef4a6810623ed4ea` (string, required) - the unique id of the rank + _id: `591469c9ef4a6810623ed4ea` (string, required) - the unique id of the rank
+ name: `Gefreiter` (string, required) - display name of the rank + name: `Gefreiter` - display name of the rank
+ fraction: `BLUFOR` (enum, required) - enum expressing the fraction in which the decoration is given + fraction: `BLUFOR` - enum expressing the fraction in which the decoration is given
+ Members + Members
+ `BLUFOR` + `BLUFOR`
+ `OPFOR` + `OPFOR`
+ `GLOBAL` + `GLOBAL`
+ level: 1 (number, required) - rank level + level: 1 - rank level
+ updatedAt: `2017-09-20T20:25:29.995Z` (string, required) - the version timestamp + updatedAt: `2017-09-20T20:25:29.995Z` (string, required) - the version timestamp
+ timestamp: `2017-05-11T13:40:25.051Z` (string, required) - the creation timestamp + timestamp: `2017-05-11T13:40:25.051Z` - the creation timestamp
+ __v: 1 (number, required) - version number + __v: 1 - version number

View File

@ -5,18 +5,6 @@ A participant managed in the system
+ _id: `5ab68d42f547ed304064e5f7` (string, required) - unique id of the army member + _id: `5ab68d42f547ed304064e5f7` (string, required) - unique id of the army member
+ username: `Jagernaut` (string, required) - the displayed username of the army member + username: `Jagernaut` (string, required) - the displayed username of the army member
+ rankLvl: 22 (number, required) - rank level representing the rank + rankLvl: 22 (number, required) - rank level representing the rank
+ squadId: `591470249e9fae286e008e31` (string, required, nullable) - id of squad which the army member is part of + squadId (Squad, required) - populated squad which the army member is part of
+ updatedAt: `2018-02-24T01:01:25.825Z` - the version timestamp + updatedAt: `2018-02-24T01:01:25.825Z` - the version timestamp
+ __v: 35 (number, required) - the version number of the object + __v: 35 (number, required) - the version number of the object
# UserPopulated (User)
User object with populated squad
## Properties
+ squadId (Squad, required) - populated squad which the army member is part of
# UserInclTimestamp (User)
A participant managed in the system, incl. creation timestamp
## Properties
+ timestamp: 2018-01-20T12:11:23.125Z (string, required) - instance creation timestamp

View File

@ -14,13 +14,7 @@ A war as used in statistics
+ budgetBlufor: 3900000 (number, required) - start budget of fraction Blufor + budgetBlufor: 3900000 (number, required) - start budget of fraction Blufor
+ budgetOpfor: 4100000 (number, required) - start budget of fraction Opfor + budgetOpfor: 4100000 (number, required) - start budget of fraction Opfor
+ endBudgetBlufor: 924000 (number, required) - end budget of fraction Blufor + endBudgetBlufor: 924000 (number, required) - end budget of fraction Blufor
+ endBudgetOpfor: 12400 (number, required) - end budget of fraction Opfor + endBudgetOpfor: -12400 (number, required) - end budget of fraction Opfor
+ timestamp: `2018-02-24T01:01:25.825Z` (string, required) - creation date + timestamp: `2018-02-24T01:01:25.825Z` (string, required) - creation date
+ updatedAt: `2018-02-24T01:01:25.825Z` (string, required) - the version timestamp + updatedAt: `2018-02-24T01:01:25.825Z` (string, required) - the version timestamp
+ __v: 0 (number, required) - the version number of the object + __v: 0 (number, required) - the version number of the object
# WarWithPlayers (War)
A war response object on creation
## Properties
+ players (array[WarPlayer], required) - collection of all participating players with their statistics

View File

@ -12,8 +12,6 @@
:[Gists](_decoration.apib) :[Gists](_decoration.apib)
:[Gists](_log.apib)
:[Gists](_player.apib) :[Gists](_player.apib)
:[Gists](_promotion.apib) :[Gists](_promotion.apib)

View File

@ -40,8 +40,6 @@ FORMAT: 1A
# Group Logs # Group Logs
:[Gists](statistics/logs.apib)
# Group Players # Group Players
:[Gists](statistics/players.apib) :[Gists](statistics/players.apib)

View File

@ -5,7 +5,7 @@ Get single campaign information
+ Parameters + Parameters
+ id: `5abd55ea9e30a76bfef747d6` (string, required) - unique id of campaign + id: `5abd55ea9e30a76bfef747d6` (string, required) - unique id of campaign
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (Campaign, fixed-type) + Attributes (Campaign, fixed-type)
@ -18,7 +18,7 @@ Create a new campaign
+ Attributes + Attributes
+ title: `Return To Kessel In A Schmelz` (string, required) - display name of the campaign + title: `Return To Kessel In A Schmelz` (string, required) - display name of the campaign
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (Campaign, fixed-type) + Attributes (Campaign, fixed-type)

View File

@ -1,18 +0,0 @@
### Get War Logs [GET /logs/{warId}]
Ge the combined log object, containing all events in collections, for a single war
+ Parameters
+ warId: `5abf65ae3fc5fa349ffd5ca3` (string, required) - unique id of the war
+ Response 200 (application/json; charset=utf-8)
+ Attributes
+ points (array[LogPoints], required)
+ budget (array[LogBudget], required)
+ respawn (array[LogRespawn], required)
+ revive (array[LogRevive], required)
+ kill (array[LogKill], required)
+ vehicle (array[LogVehicle], required)
+ transport (array[LogTransport], required)
+ flag (array[LogFlag], required)

View File

@ -1,4 +1,4 @@
### Get Player Highscore [GET /players/ranking/{campaignId}] ### Get Player Highscore [GET /ranking/{campaignId}]
List highscores for player statistics over all wars of a certain campaign. List highscores for player statistics over all wars of a certain campaign.
Every highscore player object contains a field *sum*, representing its order number in the collection Every highscore player object contains a field *sum*, representing its order number in the collection
@ -6,7 +6,7 @@ Every highscore player object contains a field *sum*, representing its order num
+ Parameters + Parameters
+ campaignId: `5abd55ea9e30a76bfef747d6` (string, required) - unique id of the campaign + campaignId: `5abd55ea9e30a76bfef747d6` (string, required) - unique id of the campaign
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes + Attributes
+ kill (array[HighscorePlayer],required) - player highscore for kill + kill (array[HighscorePlayer],required) - player highscore for kill
@ -18,17 +18,17 @@ Every highscore player object contains a field *sum*, representing its order num
+ flagTouch (array[HighscorePlayer],required) - player highscore for flag captures + flagTouch (array[HighscorePlayer],required) - player highscore for flag captures
### Get Player Campaign Statistics [GET /players/single/{campaignId}/{playerSteamId}] ### Get Player Campaign Statistics [GET /single/{campaignId}/{playerId}]
Get statistics for a single player for all wars of a campaign he took part at Get statistics for a single player for all wars of a campaign he took part at
+ Parameters + Parameters
+ campaignId: `5abd55ea9e30a76bfef747d6` (string, required) - unique id of the campaign + campaignId: `5abd55ea9e30a76bfef747d6` (string, required) - unique id of the campaign
+ playerSteamId: `76561198050321490` (string, required) - STEAM application unique user id of player + playerId: `5abf65ae3fc5fa349ffd5ca4` (string, required) - unique id of the player
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes + Attributes
+ name: `Pumarang` (string, required) - latest used playername + name: `Pumarang` (string, required) - latest used playername
+ campaign (Campaign,required) - campaign reflected from request is + campaign (Campaign,required) - campaign reflected from request is
+ players (array[WarPlayer],required) - collection of player instances in the campaign + players (array[CampaignPlayer],required) - collection of player instances in the campaign

View File

@ -1,21 +1,21 @@
### List Wars [GET /wars] ### Get Wars [GET /wars]
List all wars, subordinate to their campaign List all wars
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (array[WarCampaign], fixed-type) + Attributes (array[War], fixed-type)
### Get War [GET /wars/{id}] ### GET War [GET /wars/{id}]
Retrieve single war data Retrieve single war data
+ Parameters + Parameters
+ id: `5abf65ae3fc5fa349ffd5ca3` (string, required) - unique id of the war to fetch + id: `5abf65ae3fc5fa349ffd5ca3` (string, required) - unique id of the war to fetch
+ Response 200 (application/json; charset=utf-8) + Response 200
+ Attributes (WarWithPlayers, fixed-type) + Attributes (War, fixed-type)
### Create War [POST /wars] ### Create War [POST /wars]
@ -70,7 +70,7 @@ Create a new war
2018/03/20, 22:35:43 "[OPT] (Punkte) LOG: 2:30:00 --- Endpunktestand: (NATO 34 | CSAT 25)" 2018/03/20, 22:35:43 "[OPT] (Punkte) LOG: 2:30:00 --- Endpunktestand: (NATO 34 | CSAT 25)"
-----BOUNDARY-- -----BOUNDARY--
+ Response 201 (application/json; charset=utf-8) + Response 201
+ Attributes (War, fixed-type) + Attributes (War, fixed-type)

960
api/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@
"aglio": "^2.3.0", "aglio": "^2.3.0",
"chai": "^3.5.0", "chai": "^3.5.0",
"chai-http": "^3.0.0", "chai-http": "^3.0.0",
"dredd": "^5.1.5", "dredd": "^5.1.4",
"eslint": "^4.18.2", "eslint": "^4.18.2",
"eslint-config-google": "^0.9.1", "eslint-config-google": "^0.9.1",
"hercule": "^4.1.1", "hercule": "^4.1.1",

View File

@ -78,7 +78,7 @@ authenticate.route('/signup')
.post((req, res, next) => { .post((req, res, next) => {
create(req.body) create(req.body)
.then(() => { .then(() => {
res.send(201, {message: 'User successfully created'}); res.sendStatus(201);
}) })
.catch((err) => { .catch((err) => {
res.status(400).send(err); res.status(400).send(err);

View File

@ -58,10 +58,11 @@ logsRouter.route('/:warId')
async.parallel(resources, (error, results) => { async.parallel(resources, (error, results) => {
if (error) { if (error) {
res.status(500); res.status(500).send(error);
return;
} }
res.locals.items = results; res.locals.items = results;
next(error); next();
}); });
}) })
.all( .all(