доп фукнции апи
This commit is contained in:
+299
-5
@@ -2,10 +2,63 @@
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Moonwell Launcher API",
|
||||
"description": "API для лаунчера WoW-клиента Moonwell. Авторизация, получение манифеста файлов и скачивание обновлений.",
|
||||
"description": "API для лаунчера WoW-клиента Moonwell. Авторизация, новости, реалмы и их статусы, получение манифеста файлов и скачивание обновлений.",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"paths": {
|
||||
"/api/launcher/account": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Launcher"
|
||||
],
|
||||
"summary": "Получить информацию об аккаунте",
|
||||
"description": "Возвращает имя и текущий баланс авторизованного игрового аккаунта.",
|
||||
"operationId": "9a18d29372e8de08e1d24237580f19e5",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Информация об аккаунте",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"example": "PLAYER"
|
||||
},
|
||||
"balance": {
|
||||
"type": "string",
|
||||
"example": "1250.00"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Не авторизован",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Unauthenticated."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/launcher/login": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -425,6 +478,247 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/launcher/realms": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Launcher"
|
||||
],
|
||||
"summary": "Получить список реалмов и их статус",
|
||||
"description": "Возвращает реалмы из таблицы realmlist. Статус online означает, что игровой порт реалма доступен по TCP.",
|
||||
"operationId": "6d142b37a7b9a121b7ad02fd6405e054",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Список реалмов",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "MoonWell"
|
||||
},
|
||||
"address": {
|
||||
"type": "string",
|
||||
"example": "logon.moon-well.online"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"example": 8085
|
||||
},
|
||||
"icon": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"flag": {
|
||||
"type": "integer",
|
||||
"example": 0
|
||||
},
|
||||
"timezone": {
|
||||
"type": "integer",
|
||||
"example": 4
|
||||
},
|
||||
"population": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 0.5
|
||||
},
|
||||
"online": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "online",
|
||||
"enum": [
|
||||
"online",
|
||||
"offline"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"checked_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"503": {
|
||||
"description": "Не удалось получить список реалмов",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Не удалось получить список реалмов."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"429": {
|
||||
"description": "Слишком много запросов"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/launcher/register": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Launcher Auth"
|
||||
],
|
||||
"summary": "Зарегистрировать игровой аккаунт",
|
||||
"description": "Создаёт игровой аккаунт AzerothCore. Инвайт-код обязателен, если на сервере включена регистрация по приглашениям.",
|
||||
"operationId": "bfc1dbd42cbcc339bc8a13dbf189c525",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": [
|
||||
"username",
|
||||
"email",
|
||||
"password",
|
||||
"password_confirmation",
|
||||
"terms"
|
||||
],
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9]+$",
|
||||
"example": "Player",
|
||||
"maxLength": 32,
|
||||
"minLength": 3
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"example": "player@example.com",
|
||||
"maxLength": 255
|
||||
},
|
||||
"invite_code": {
|
||||
"type": "string",
|
||||
"example": "ABCD-EFGH-IJKL",
|
||||
"nullable": true,
|
||||
"maxLength": 32,
|
||||
"minLength": 6
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"example": "Secret123",
|
||||
"maxLength": 32,
|
||||
"minLength": 8
|
||||
},
|
||||
"password_confirmation": {
|
||||
"type": "string",
|
||||
"example": "Secret123",
|
||||
"maxLength": 32,
|
||||
"minLength": 8
|
||||
},
|
||||
"terms": {
|
||||
"description": "Согласие с правилами сервера и пользовательским соглашением",
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Аккаунт создан",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Игровой аккаунт успешно создан."
|
||||
},
|
||||
"account": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"example": 77
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"example": "PLAYER"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Ошибка валидации, занятый логин или неверный инвайт-код",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Такой игровой аккаунт уже существует."
|
||||
},
|
||||
"errors": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Внутренняя ошибка регистрации",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Не удалось создать аккаунт. Попробуй снова позже."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"429": {
|
||||
"description": "Слишком много запросов"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -444,14 +738,14 @@
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Launcher Auth",
|
||||
"description": "Launcher Auth"
|
||||
},
|
||||
{
|
||||
"name": "Launcher",
|
||||
"description": "Launcher"
|
||||
},
|
||||
{
|
||||
"name": "Launcher Auth",
|
||||
"description": "Launcher Auth"
|
||||
},
|
||||
{
|
||||
"name": "Launcher Service",
|
||||
"description": "Launcher Service"
|
||||
|
||||
Reference in New Issue
Block a user