Skip to content

CalebQ42/swassistant-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
    ]
}

About

Custom backend for SWAssistant

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages