add docs
This commit is contained in:
parent
e20ab2db2b
commit
af75554c73
@ -10,6 +10,7 @@ type Config struct {
|
||||
Storage Storage `yaml:"storage"`
|
||||
PaymentService PaymentService `yaml:"paymentService"`
|
||||
AuthService AuthService `yaml:"authService"`
|
||||
HOST string `yaml:"host"`
|
||||
}
|
||||
|
||||
type Database struct {
|
||||
|
@ -72,9 +72,424 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": {
|
||||
"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": {
|
||||
"get": {
|
||||
"description": "Get outer donate page info",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Donate"
|
||||
],
|
||||
"summary": "Get outer donate page info",
|
||||
"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"
|
||||
},
|
||||
"pageBackground": {
|
||||
"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": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"login": {
|
||||
"type": "string"
|
||||
},
|
||||
"online": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"donat-widget_internal_model.UpdateDonatPage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -92,6 +507,74 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
|
@ -65,9 +65,424 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": {
|
||||
"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": {
|
||||
"get": {
|
||||
"description": "Get outer donate page info",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Donate"
|
||||
],
|
||||
"summary": "Get outer donate page info",
|
||||
"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"
|
||||
},
|
||||
"pageBackground": {
|
||||
"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": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"login": {
|
||||
"type": "string"
|
||||
},
|
||||
"online": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"donat-widget_internal_model.UpdateDonatPage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -85,6 +500,74 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
|
@ -1,5 +1,43 @@
|
||||
basePath: /api/donat-wiget
|
||||
definitions:
|
||||
donat-widget_internal_model.FilterSettingResponse:
|
||||
properties:
|
||||
enableLinks:
|
||||
type: boolean
|
||||
filteredWords:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
donat-widget_internal_model.InnerDonatePageResponse:
|
||||
properties:
|
||||
avatar:
|
||||
type: string
|
||||
backgroundImg:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
pageBackground:
|
||||
type: string
|
||||
textAfterDonat:
|
||||
type: string
|
||||
type: object
|
||||
donat-widget_internal_model.ModerationResponse:
|
||||
properties:
|
||||
duration:
|
||||
type: integer
|
||||
enable:
|
||||
type: boolean
|
||||
type: object
|
||||
donat-widget_internal_model.OuterDonatePageResponse:
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
login:
|
||||
type: string
|
||||
online:
|
||||
type: string
|
||||
type: object
|
||||
donat-widget_internal_model.UpdateDonatPage:
|
||||
properties:
|
||||
description:
|
||||
@ -11,6 +49,50 @@ definitions:
|
||||
textAfterDonat:
|
||||
type: string
|
||||
type: object
|
||||
donat-widget_internal_model.UpdateFilterSettings:
|
||||
properties:
|
||||
addWords:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
enableLinks:
|
||||
type: boolean
|
||||
removeWords:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
donat-widget_internal_model.UpdateModeration:
|
||||
properties:
|
||||
duration:
|
||||
type: integer
|
||||
enable:
|
||||
type: boolean
|
||||
type: object
|
||||
donat-widget_internal_model.UpdateVoiceSettings:
|
||||
properties:
|
||||
enable:
|
||||
type: boolean
|
||||
minPrice:
|
||||
type: integer
|
||||
scenery:
|
||||
type: string
|
||||
voiceSoundPercent:
|
||||
type: integer
|
||||
voiceSpeed:
|
||||
type: integer
|
||||
type: object
|
||||
donat-widget_internal_model.VoiceSettingsResponse:
|
||||
properties:
|
||||
minPrice:
|
||||
type: integer
|
||||
scenery:
|
||||
type: string
|
||||
voiceSoundPercent:
|
||||
type: integer
|
||||
voiceSpeed:
|
||||
type: integer
|
||||
type: object
|
||||
echo.HTTPError:
|
||||
properties:
|
||||
message: {}
|
||||
@ -59,6 +141,241 @@ paths:
|
||||
summary: Update personal streamer donate page.
|
||||
tags:
|
||||
- Donate
|
||||
/filters-settings:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get donat filters settings
|
||||
produces:
|
||||
- application/json
|
||||
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'
|
||||
summary: Get donat filters settings
|
||||
tags:
|
||||
- Donate
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Update donat filters settings.
|
||||
parameters:
|
||||
- description: Update fields
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/donat-widget_internal_model.UpdateFilterSettings'
|
||||
- description: Background image
|
||||
in: formData
|
||||
name: background
|
||||
type: file
|
||||
produces:
|
||||
- application/json
|
||||
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'
|
||||
summary: Update donat filters settings.
|
||||
tags:
|
||||
- Donate
|
||||
/inner-donate-page:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get inner donate page info
|
||||
produces:
|
||||
- application/json
|
||||
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'
|
||||
summary: Get inner donate page info
|
||||
tags:
|
||||
- Donate
|
||||
/moderation-settings:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get donat moderation settings
|
||||
produces:
|
||||
- application/json
|
||||
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'
|
||||
summary: Get donat moderation settings
|
||||
tags:
|
||||
- Donate
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Update donat moderation settings
|
||||
produces:
|
||||
- application/json
|
||||
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'
|
||||
summary: Update donat moderation settings
|
||||
tags:
|
||||
- Donate
|
||||
/outer-donate-page:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get outer donate page info
|
||||
produces:
|
||||
- application/json
|
||||
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'
|
||||
summary: Get outer donate page info
|
||||
tags:
|
||||
- Donate
|
||||
/voice-settings:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get donat voice settings
|
||||
produces:
|
||||
- application/json
|
||||
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'
|
||||
summary: Get donat voice settings
|
||||
tags:
|
||||
- Donate
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Update donat voice settings.
|
||||
parameters:
|
||||
- description: Update fields
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/donat-widget_internal_model.UpdateVoiceSettings'
|
||||
- description: Background image
|
||||
in: formData
|
||||
name: background
|
||||
type: file
|
||||
produces:
|
||||
- application/json
|
||||
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'
|
||||
summary: Update donat voice settings.
|
||||
tags:
|
||||
- Donate
|
||||
securityDefinitions:
|
||||
BearerAuth:
|
||||
in: header
|
||||
|
Loading…
x
Reference in New Issue
Block a user