Categorygithub.com/CalebQ42/swassistant-backend
modulepackage
0.2.1
Repository: https://github.com/calebq42/swassistant-backend.git
Documentation: pkg.go.dev

# README

swassistant-backend

Custom backend for SWAssistant. Extension of stupid-backend

APIs

Profiles

Character, vehicles, and minion profiles.

POST: /profile/upload?key={api_key}?type={character|vehicle|minion}

Upload a profile.

Request Body:

{
    // profile data
}

Note: Only allows up to 5MB of data. If over 5MB returns 413. Further limits might be imposed in the future.

Response:

{
    "id": "profile ID",
    "expiration": 0 // Unix time (Seconds) of expiration
}

GET: /profile/{profile id}?key={api_key}

Get an uploaded profile.

Response:

{
    "type": "character|vehicle|minion",
    // profile data minus uid
}

Rooms

GET: /rooms/list?key={api_key}&token={jwt_token}

Get a list of rooms your currently a part of.

Response:

[
    {
        "id": "room ID",
        "name": "room name",
        "owner": "username"
    }
]

POST: /rooms/new?key={api_key}&token={jwt_token}?name={room name}

Create a new room

Response:

{
    "id": "room ID",
    "name": "room name"
}

GET: /rooms/{room id}?key={api_key}&token={jwt_token}

Get info about a room.

{
    "id": "room ID",
    "name": "room name",
    "owner": "username",
    "users": [
        "username"
    ],
    "profiles": [
        "profile uuids"
    ]
}

# Functions

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author