Files
darkstorm-server/internal/swassistant
Caleb Gardner 2afbd64dc2 Added CallbackApp to better access backend.Backend from with in an App
Fixed issues with CORS not being able to do an OPTIONS request
Fixed folders not being processed properly.
Fixed some other issues.
2024-08-07 02:24:54 -05:00
..

swassistant-backend

Custom backend for SWAssistant. Extension of darkstorm-backend

APIs

For POST requests, the X-API-Key http header must be set.

Profiles

Upload profile to share

Character, vehicles, and minion profiles.

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

Upload a profile. type query is required.

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 a shared profile

GET: /profile/{profileID}

Get an uploaded profile.

Response:

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

Rooms

All room requests must include both X-API-Key and Authorization headers.

Room list

GET: /rooms

Get a list of rooms your currently a part of.

Response:

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

Create new room

POST: /rooms/new?name={roomName}

Create a new room. name query is required.

Response:

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

Get room info

GET: /rooms/{roomID}

Get info about a room.

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