619 lines
21 KiB
JSON
619 lines
21 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "Donate auth service docs.",
|
|
"title": "Donate Auth Documentation",
|
|
"contact": {},
|
|
"version": "3.0"
|
|
},
|
|
"basePath": "/api/widget",
|
|
"paths": {
|
|
"/donat-page": {
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Update personal streamer donate page.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Update personal streamer donate page.",
|
|
"parameters": [
|
|
{
|
|
"description": "Update fields",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.UpdateDonatPage"
|
|
}
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Background image",
|
|
"name": "background",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Head image",
|
|
"name": "head-img",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Donat page updated successfully",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/filters-settings": {
|
|
"get": {
|
|
"description": "Get donat filters settings",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Get donat filters settings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Current filters settings",
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.FilterSettingResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update donat filters settings.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Update donat filters settings.",
|
|
"parameters": [
|
|
{
|
|
"description": "Update fields",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.UpdateFilterSettings"
|
|
}
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Background image",
|
|
"name": "background",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Voice settings updated successfully",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/inner-donate-page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Get inner donate page info",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Get inner donate page info",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Current donate page state",
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.InnerDonatePageResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/moderation-settings": {
|
|
"get": {
|
|
"description": "Get donat moderation settings",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Get donat moderation settings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Current moderation settings",
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.ModerationResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update donat moderation settings",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Update donat moderation settings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Update moderation settings",
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.UpdateModeration"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/outer-donate-page/{streamer-login}": {
|
|
"get": {
|
|
"description": "Get outer donate page info",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Get outer donate page info",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Login стримера",
|
|
"name": "streamer-login",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Current donate page state",
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.OuterDonatePageResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/voice-settings": {
|
|
"get": {
|
|
"description": "Get donat voice settings",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Get donat voice settings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Current voice settings",
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.VoiceSettingsResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update donat voice settings.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Donate"
|
|
],
|
|
"summary": "Update donat voice settings.",
|
|
"parameters": [
|
|
{
|
|
"description": "Update fields",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/donat-widget_internal_model.UpdateVoiceSettings"
|
|
}
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Background image",
|
|
"name": "background",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Voice settings updated successfully",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized or expired token",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"schema": {
|
|
"$ref": "#/definitions/echo.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"donat-widget_internal_model.FilterSettingResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"enableLinks": {
|
|
"type": "boolean"
|
|
},
|
|
"filteredWords": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"donat-widget_internal_model.InnerDonatePageResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"avatar": {
|
|
"type": "string"
|
|
},
|
|
"backgroundImg": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"headImg": {
|
|
"type": "string"
|
|
},
|
|
"textAfterDonat": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"donat-widget_internal_model.ModerationResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"duration": {
|
|
"type": "integer"
|
|
},
|
|
"enable": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"donat-widget_internal_model.OuterDonatePageResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"avatar_url": {
|
|
"type": "string"
|
|
},
|
|
"background_url": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"headImg": {
|
|
"type": "string"
|
|
},
|
|
"login": {
|
|
"type": "string"
|
|
},
|
|
"online": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"donat-widget_internal_model.UpdateDonatPage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"pageBackground": {
|
|
"type": "string"
|
|
},
|
|
"profileAvatar": {
|
|
"type": "boolean"
|
|
},
|
|
"textAfterDonat": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"donat-widget_internal_model.UpdateFilterSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"addWords": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"enableLinks": {
|
|
"type": "boolean"
|
|
},
|
|
"removeWords": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"donat-widget_internal_model.UpdateModeration": {
|
|
"type": "object",
|
|
"properties": {
|
|
"duration": {
|
|
"type": "integer"
|
|
},
|
|
"enable": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"donat-widget_internal_model.UpdateVoiceSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"enable": {
|
|
"type": "boolean"
|
|
},
|
|
"minPrice": {
|
|
"type": "integer"
|
|
},
|
|
"scenery": {
|
|
"type": "string"
|
|
},
|
|
"voiceSoundPercent": {
|
|
"type": "integer"
|
|
},
|
|
"voiceSpeed": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"donat-widget_internal_model.VoiceSettingsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"minPrice": {
|
|
"type": "integer"
|
|
},
|
|
"scenery": {
|
|
"type": "string"
|
|
},
|
|
"voiceSoundPercent": {
|
|
"type": "integer"
|
|
},
|
|
"voiceSpeed": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"echo.HTTPError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BearerAuth": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
} |