Sonolus Wiki

POST /sonolus/{type}/{itemName}/community/comments/{commentName}/submit

/sonolus/{type}/{itemName}/community/comments/{commentName}/submit allows Sonolus app to submit community actions to comment of name {commentName} in item of name {itemName}.

URL Parameters

URL ParameterValueDescription
typestringposts, playlists, levels, skins, backgrounds, effects, particles, engines, or replays.
itemNamestringName of item.
commentNamestringName of comment.

Query Parameters

Query ParameterValueDescription
localizationstringSee localization.
Configuration OptionsanySee Options Query Parameters.

Request Headers

HeaderValueDescription
Sonolus-SessionstringOptional, see Sonolus-Session.

Request Body

type ServerSubmitItemCommunityCommentActionRequest = {
    values: string
}

values

Query parameters of submitted action.

See Options Query Parameters.

Response Code

CodeDescription
200 OK
401 UnauthorizedAuthentication required or expired.
404 Not Found

Response Headers

HeaderValueDescription
Sonolus-VersionstringOptional, see Sonolus-Version.

Response Body

type ServerSubmitItemCommunityCommentActionResponse = {
    key: string
    hashes: string[]
    shouldUpdateCommunity?: boolean
    shouldUpdateComments?: boolean
    shouldNavigateCommentsToPage?: number
}

shouldUpdateCommunity

Whether community section should update or not.

shouldNavigateCommentsToPage

Whether comment list should navigate to specified page or not.

key

Server defined upload key.

hashes

Hashes of files needed to be uploaded.

Only files specified in request body values can be uploaded.

If not empty, files will be uploaded using POST /sonolus/{type}/{itemName}/community/comments/{commentName}/upload.

Examples

{
    "key": "...",
    "hashes": [
        // ...
    ],
    "shouldUpdateCommunity": true,
    "shouldUpdateComments": true,
    "shouldNavigateCommentsToPage": 5
}