Skip to content

GET /sonolus/info

/sonolus/info fornece informações do servidor e é usado pelo aplicativo Sonolus para preencher a página inicial do servidor.

Parâmetros de URL

Nenhum.

Parâmetros de consulta

Parâmetro de consultaValorDescrição
localizationstringVeja localization .
Opções de configuraçãoanyConsulte Parâmetros de consulta de opções .

Cabeçalhos de solicitação

CabeçalhoValorDescrição
Sonolus-SessionstringOpcional, veja Sonolus-Session .

Corpo da solicitação

Nenhum.

Código de resposta

CódigoDescrição
200 OK
401 UnauthorizedAutenticação necessária ou expirada.

Cabeçalhos de resposta

CabeçalhoValorDescrição
Sonolus-VersionstringOpcional, veja Sonolus-Version .

Corpo de Resposta

ts
type ServerInfo = {
    title: string
    description?: string
    buttons: ServerInfoButton[]
    configuration: ServerConfiguration
    banner?: Srl
}

type ServerInfoButton = {
    type:
        | 'authentication'
        | 'multiplayer'
        | 'post'
        | 'playlist'
        | 'level'
        | 'replay'
        | 'skin'
        | 'background'
        | 'effect'
        | 'particle'
        | 'engine'
        | 'configuration'
}

type ServerConfiguration = {
    options: ServerOption[]
}

configuration.options

Opções de configuração.

Se modificado pelo cliente, o cliente anexará valores modificados a cada solicitação.

Exemplos

json
{
    "title": "My Server Title",
    "description": "Description of my server.",
    "buttons": [
        // ...
    ],
    "configuration": {
        "options": [
            // ...
        ]
    },
    "banner": {
        // ...
    }
}