{ "swagger": "2.0", "info": { "title": "CravingControl", "description": "cracon provides ...\n\n Semantics:\n Add{T}(s) ({T}(s)Record) returns {T}(s) // Add / POST\n Ovr{T}(s) ({T}(s)Record) returns {T}(s) // Overwrite / PUT\n Mod{T}(s) ({T}(s)Redef) returns {T}(s) // Modify / PATCH\n Get{T}(s) ({T}(s)Request) returns {T}(s) // Get / GET\n Fnd{T}(s) ({T}(s)Referral) returns {T}(s) // Find / GET\n Spn{T}s ({T}sRange) returns {T}s // Span / GET\n Rmv{T}(s) ({T}(s)Redactor) returns Empty // Remove / DELETE\n Unr{T} ({T}Restorer) returns {T} // Unremove / PATCH", "version": "version not set" }, "schemes": [ "http", "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/auth": { "post": { "operationId": "AddAuth", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlAuth" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/idlAuthRecord" } } ], "tags": [ "General" ] } }, "/auth/{token}": { "delete": { "summary": "RmvAuth requires \"Header: Authorization\".", "operationId": "RmvAuth", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlEmpty" } } }, "parameters": [ { "name": "token", "in": "path", "required": true, "type": "string", "format": "string" } ], "tags": [ "General" ] } }, "/game/{slug}": { "get": { "summary": "GetGame requires \"Header: Authorization\".", "operationId": "GetGame", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlGame" } } }, "parameters": [ { "name": "slug", "in": "path", "required": true, "type": "string", "format": "string" } ], "tags": [ "General" ] } }, "/group/{groupId}/gimages": { "get": { "summary": "SpnGimages requires \"Header: Authorization\".", "operationId": "SpnGimages", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlGimages" } } }, "parameters": [ { "name": "groupId", "in": "path", "required": true, "type": "string", "format": "uint64" }, { "name": "valid", "in": "query", "required": false, "type": "boolean" }, { "name": "limit", "in": "query", "required": false, "type": "integer" } ], "tags": [ "General" ] } }, "/user": { "post": { "summary": "AddUser requires \"Header: Authorization\".", "operationId": "AddUser", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlUser" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/idlUserRecord" } } ], "tags": [ "General" ] } }, "/user/{email}/password_reset": { "post": { "summary": "AddUserPassReset ...", "operationId": "AddUserPassReset", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlUserPassReset" } } }, "parameters": [ { "name": "email", "in": "path", "required": true, "type": "string", "format": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/idlUserPassResetRecord" } } ], "tags": [ "General" ] } }, "/user/{id}": { "get": { "summary": "GetUser requires \"Header: Authorization\".", "operationId": "GetUser", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlUser" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "format": "uint64" } ], "tags": [ "General" ] } }, "/user/{userId}/gameplays": { "get": { "summary": "FndGameplays requires \"Header: Authorization\".", "operationId": "FndGameplays", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlGameplays" } } }, "parameters": [ { "name": "userId", "in": "path", "required": true, "type": "string", "format": "uint64" }, { "name": "gameIds", "in": "query", "required": false, "type": "array" } ], "tags": [ "General" ] } }, "/users": { "get": { "summary": "GetUsers requires \"Header: Authorization\".", "operationId": "GetUsers", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlUsers" } } }, "parameters": [ { "name": "ids", "in": "query", "required": false, "type": "array" } ], "tags": [ "General" ] }, "post": { "summary": "AddUsers requires \"Header: Authorization\".", "operationId": "AddUsers", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/idlUsers" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/idlUsersRecord" } } ], "tags": [ "General" ] } } }, "definitions": { "idlAuth": { "type": "object", "properties": { "token": { "type": "string", "format": "string" } } }, "idlAuthRecord": { "type": "object", "properties": { "email": { "type": "string", "format": "string" }, "password": { "type": "string", "format": "string" } } }, "idlAuthRedactor": { "type": "object", "properties": { "token": { "type": "string", "format": "string" } } }, "idlEmpty": { "type": "object" }, "idlGame": { "type": "object", "properties": { "blockCt": { "type": "integer", "format": "int64" }, "blocked": { "type": "string", "format": "date-time" }, "created": { "type": "string", "format": "date-time" }, "decTrigger": { "type": "integer", "format": "int64" }, "deleted": { "type": "string", "format": "date-time" }, "description": { "type": "string", "format": "string" }, "durDec": { "type": "integer", "format": "int64" }, "durInc": { "type": "integer", "format": "int64" }, "duration": { "type": "integer", "format": "int64" }, "fixImagePath": { "type": "string", "format": "string" }, "icon": { "type": "string", "format": "string" }, "id": { "type": "string", "format": "uint64" }, "incTrigger": { "type": "integer", "format": "int64" }, "interval": { "type": "integer", "format": "int64" }, "name": { "type": "string", "format": "string" }, "offset": { "type": "integer", "format": "int64" }, "slug": { "type": "string", "format": "string" }, "trialCt": { "type": "integer", "format": "int64" }, "updated": { "type": "string", "format": "date-time" } } }, "idlGameRequest": { "type": "object", "properties": { "slug": { "type": "string", "format": "string" } } }, "idlGameplay": { "type": "object", "properties": { "created": { "type": "string", "format": "date-time" }, "duration": { "type": "integer", "format": "int64" }, "gameId": { "type": "string", "format": "uint64" }, "id": { "type": "string", "format": "uint64" }, "updated": { "type": "string", "format": "date-time" } } }, "idlGameplays": { "type": "object", "properties": { "gameplays": { "type": "array", "items": { "$ref": "#/definitions/idlGameplay" } } } }, "idlGameplaysReferral": { "type": "object", "properties": { "gameIds": { "type": "array", "items": { "type": "string", "format": "uint64" } }, "userId": { "type": "string", "format": "uint64" } } }, "idlGimage": { "type": "object", "properties": { "created": { "type": "string", "format": "date-time" }, "deleted": { "type": "string", "format": "date-time" }, "groupId": { "type": "string", "format": "uint64" }, "id": { "type": "string", "format": "uint64" }, "path": { "type": "string", "format": "string" }, "updated": { "type": "string", "format": "date-time" }, "valid": { "type": "boolean", "format": "boolean" } } }, "idlGimages": { "type": "object", "properties": { "gimages": { "type": "array", "items": { "$ref": "#/definitions/idlGimage" } } } }, "idlGimagesRange": { "type": "object", "properties": { "groupId": { "type": "string", "format": "uint64" }, "limit": { "type": "integer", "format": "int64" }, "valid": { "type": "boolean", "format": "boolean" } } }, "idlRole": { "type": "object", "properties": { "id": { "type": "string", "format": "uint64" }, "name": { "type": "string", "format": "string" }, "weight": { "type": "integer", "format": "int64" } } }, "idlUser": { "type": "object", "properties": { "avatar": { "type": "string", "format": "string" }, "blocked": { "type": "string", "format": "date-time" }, "created": { "type": "string", "format": "date-time" }, "deleted": { "type": "string", "format": "date-time" }, "email": { "type": "string", "format": "string" }, "firstName": { "type": "string", "format": "string" }, "groupID": { "type": "string", "format": "uint64" }, "id": { "type": "string", "format": "uint64" }, "lastLogin": { "type": "string", "format": "date-time" }, "lastName": { "type": "string", "format": "string" }, "roles": { "type": "array", "items": { "$ref": "#/definitions/idlRole" } }, "updated": { "type": "string", "format": "date-time" }, "username": { "type": "string", "format": "string" } } }, "idlUserPassReset": { "type": "object" }, "idlUserPassResetRecord": { "type": "object", "properties": { "email": { "type": "string", "format": "string" }, "proof": { "type": "string", "format": "string" } } }, "idlUserRecord": { "type": "object", "properties": { "avatar": { "type": "string", "format": "string" }, "email": { "type": "string", "format": "string" }, "firstName": { "type": "string", "format": "string" }, "groupID": { "type": "string", "format": "uint64" }, "lastName": { "type": "string", "format": "string" }, "password": { "type": "string", "format": "string" }, "roles": { "type": "array", "items": { "type": "string", "format": "uint64" } }, "username": { "type": "string", "format": "string" } } }, "idlUserRequest": { "type": "object", "properties": { "id": { "type": "string", "format": "uint64" } } }, "idlUsers": { "type": "object", "properties": { "users": { "type": "array", "items": { "$ref": "#/definitions/idlUser" } } } }, "idlUsersRecord": { "type": "object", "properties": { "records": { "type": "array", "items": { "$ref": "#/definitions/idlUserRecord" } } } }, "idlUsersRequest": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string", "format": "uint64" } } } } } }