{ "swagger": "2.0", "info": { "description": "This is the Swagger documentation for DCU Games Society's 2022 Humans Vs Zombies event.", "title": "DCU Games Society Humans Vs Zombies", "contact": {}, "version": "1.0" }, "basePath": "/", "paths": { "/cure": { "get": { "description": "Cures a zombie or infected human", "produces": [ "text/plain" ], "summary": "Cure", "parameters": [ { "type": "string", "description": "Target ID", "name": "target", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/kill": { "get": { "description": "Kills a zombie if user is authenticated as a human. Gives zombie target the stunned state", "produces": [ "text/plain" ], "summary": "Kill", "parameters": [ { "type": "string", "description": "Target ID", "name": "target", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/login": { "post": { "description": "Login", "consumes": [ "application/json" ], "produces": [ "application/json" ], "summary": "Login", "parameters": [ { "description": "Player login", "name": "info", "in": "body", "required": true, "schema": { "$ref": "#/definitions/main.Login" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/main.Player" } } } } }, "/me": { "get": { "description": "Shows user information", "produces": [ "application/json" ], "summary": "Me", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/main.Player" } } } } }, "/revive": { "get": { "description": "Revives a stunned zombie", "produces": [ "text/plain" ], "summary": "Revive", "parameters": [ { "type": "string", "description": "Target ID", "name": "target", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/tag": { "get": { "description": "Tag a human as a zombie. Gives target the infected state if user is a zombie or core zombie.", "produces": [ "text/plain" ], "summary": "Tag", "parameters": [ { "type": "string", "description": "Target ID", "name": "target", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } } }, "definitions": { "main.Login": { "type": "object", "properties": { "name": { "type": "string" }, "password": { "type": "string" } } }, "main.Player": { "type": "object", "properties": { "cures": { "type": "integer" }, "extensions": { "type": "integer" }, "id": { "type": "string" }, "kills": { "type": "integer" }, "last_kill": { "type": "string" }, "last_tagged": { "type": "string" }, "name": { "type": "string" }, "revives": { "type": "integer" }, "state": { "type": "integer" } } } } }