Skip to content

Commit

Permalink
doc(Game): Fix doc for game.won. Closes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinezanardi committed Nov 14, 2020
1 parent 5981198 commit 2e7fefc
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 55 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# 📈 LIST OF CHANGES FOR WEREWOLVES ASSISTANT API

## 0.7.0 (2020-11-??)

### 📚 Documentation

* [#57](https://github.com/antoinezanardi/werewolves-assistant-web/issues/57) - Fix doc for `game.won`.

### 📦 Packages

* `@sentry/node` updated to version `5.27.4`.
* `mongoose` updated to version `5.10.14`.

---

## 0.6.2 (2020-11-08)

### 🐛 Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion config/apidoc/apidoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "\uD83D\uDC3A Werewolves Assistant API",
"version": "0.6.2",
"version": "0.7.0",
"description": "Werewolves Assistant API provides over HTTP requests a way of manage Werewolves games in order to help the game master in his task.",
"header": {
"title": "Classes",
Expand Down
4 changes: 2 additions & 2 deletions config/apidoc/header.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
| status | String | Game's current status. (_See: [Codes - Game Statuses](#game-statuses)_) |
| history | [GameHistory[]](#game-history-class) | Game's history. (_See: [Classes - Game History](#game-history-class)_) |
| **won*** | Object | Winner(s) of the game when status is `done`. |
|   by | String | Can be either a group or a role. (_Possibilites: `werewolves` or `villagers`_) |
|   players | [Player[]](#player-class) | List of player(s) who won. (_See: [Classes - Player](#player-class)_) |
|   by | String | Can be either a group or a role. (_Possibilities: `werewolves`, `villagers` or null if nobody won_) |
| **  players*** | [Player[]](#player-class) | List of player(s) who won. (_See: [Classes - Player](#player-class)_) |
| **review*** | Object | Game master can attach a game review only if its status is set to `canceled` or `done`. |
|   rating | Number | Review's rating, from 0 to 5. |
| **  comment*** | String | Review's comment, from 1 to 500 characters long. |
Expand Down
92 changes: 46 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "werewolwes-assistant-api",
"version": "0.6.2",
"version": "0.7.0",
"description": "Back end for the werewolves assistant",
"main": "app.js",
"scripts": {
Expand Down Expand Up @@ -34,7 +34,7 @@
"nodemon": "^2.0.6"
},
"dependencies": {
"@sentry/node": "^5.27.3",
"@sentry/node": "^5.27.4",
"apidoc": "^0.25.0",
"bcrypt": "^5.0.0",
"body-parser": "^1.19.0",
Expand All @@ -47,7 +47,7 @@
"jsonwebtoken": "^8.5.1",
"migrate-mongo": "^8.1.4",
"mongo-dot-notation": "^2.0.0",
"mongoose": "^5.10.13",
"mongoose": "^5.10.14",
"passport": "^0.4.1",
"passport-http": "^0.3.0",
"passport-jwt": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/routes/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ module.exports = app => {
* @apiSuccess {String} status Game's current status. (_Possibilities: [Codes - Game Statuses](#game-statuses)_)
* @apiSuccess {GameHistory[]} history Game's history. (_See: [Classes - Game History](#game-history-class)_)
* @apiSuccess {Object} [won] Winners of the game when status is `done`.
* @apiSuccess {String={"werewolves", "villagers"}} won.by Can be either a group or a role. (_Possibilities: `werewolves` or `villagers`_)
* @apiSuccess {Player[]} won.players List of player(s) who won. (_See: [Classes - Player](#player-class)_)
* @apiSuccess {String={"werewolves", "villagers", null}} won.by Can be either a group or a role. (_Possibilities: `werewolves`, `villagers` or null if nobody won_)
* @apiSuccess {Player[]} [won.players] List of player(s) who won. (_See: [Classes - Player](#player-class)_)
* @apiSuccess {Date} createdAt When the game was created.
* @apiSuccess {Date} updatedAt When the game was updated.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = app => {
* @apiSuccess {String} version API's version
*/
app.route("/").get((req, res) => {
res.status(200).json({ name: "🐺 Werewolves Assistant API", version: "0.6.2" });
res.status(200).json({ name: "🐺 Werewolves Assistant API", version: "0.7.0" });
});
return;
}
Expand Down

0 comments on commit 2e7fefc

Please sign in to comment.