Sets and Subsets API

v1/sets: Get all sets for the user

Returns all of the current user's sets, in no particular order.

Input:

{ "token": "" }

Output:

{
  "success": true,
  "sets": [
    {
      "id": "",
      "name": "",
      "icon": "",
      "admin": false,
      "subsets": [
        {
          "id": "",
          "name": "",
        }
      ],
      "members": [
        {
          "uid": "",
          "username": "",
          "displayName": "",
          "email": "",
          "image?": "",
          "bio?": "",
          "online": true
        }
      ],
      "voiceMembers": [
        {
          "peerId": "",
          "user": {
            "uid": "",
            "username": "",
            "displayName": "",
            "email": "",
            "image?": "",
            "bio?": "",
            "online": true
          }
        }
      ]
    }
  ]
}

v1/set: Get set details

Gets details for a specific set. This endpoint requires authentication, and will return an error if the user is not a member of the set.

Input:

{ "token": "", "id": "" }

Output:

{
  "success": true,
  "set": {
    "id": "",
    "name": "",
    "icon": "",
    "admin": false,
    "subsets": [
      {
        "id": "",
        "name": "",
      }
    ],
    "members": [
      {
        "uid": "",
        "username": "",
        "displayName": "",
        "email": "",
        "image?": "",
        "bio?": "",
        "online": true
      }
    ],
    "voiceMembers": [
      {
        "peerId": "",
        "user": {
          "uid": "",
          "username": "",
          "displayName": "",
          "email": "",
          "image?": "",
          "bio?": "",
          "online": true
        }
      }
    ]
  }
}

v1/createSet: Create a new set

Creates a new set with the given name, and icon if supplied. Returns the ID of the new set. The authenticated user will automatically become a member of the set, and will also be given administrative privileges over the set.

Input:

{
  "token": "",
  "name": "",
  "icon?": "",
}

Output:

{ "success": true, "id": "" }

v1/createSubset: Create a new subset

Creates a new subset of the given set with the given name. Returns the ID of the new subset.

Input:

{
  "token": "",
  "set": "",
  "name": "",
}

Output:

{ "success": true, "id": "" }

v1/invites: Get all invites for a set

Returns all the invites for the given set. Requires the user to be a member of the set.

Input:

{
  "token": "",
  "set": "",
}

Output:

{
  "success": true,
  "invites": [
    {
      "id": "",
      "setId": "",
      "setName": "",
      "setIcon": "",
      "code": "",
      "created": 0, // UNIX timestamp
      "expires": 0, // UNIX timestamp
      "uses": 0
    }
  ]
}

v1/invite: Get information about a specific invite

Returns information about the specific invite. Does not require authentication.

Input:

{ "code": "" }

Output:

{
  "success": true,
  "invite": {
    "id": "",
    "setId": "",
    "setName": "",
    "setIcon": "",
    "code": "",
    "created": 0, // UNIX timestamp
    "expires": 0, // UNIX timestamp
    "uses": 0
  }
}

v1/createInvite: Create a new invite code

Creates a new invite code for the given set. Requires the user to be an administrator of the set. If a custom code is specified, the user must subscribe to Equion Diffontial (maybe coming soon?) to use it.

Input:

{
  "token": "",
  "set": "",
  "duration?": 0, // minutes
  "code?": "",
}

Output:

{ "success": true, "code": "" }

v1/revokeInvite: Revoke an invite code

Revokes an invite for the given set. Requires the user to be an administrator of the set.

Input:

{
  "token": "",
  "set": "",
  "invite": "",
}

Output:

{ "success": true }

v1/joinSet: Join a set

Joins the authenticated user to the set with the given invite code.

Input:

{
  "token": "",
  "code": "",
}

Output:

{
  "success": true,
  "id": "",
}

v1/leaveSet: Leave a set

Removes the authenticated user from the given set.

Input:

{
  "token": "",
  "set": "",
}

Output:

{ "success": true }

v1/updateSet: Update or delete set

Updates the details of the given set or deletes it. Requires admin privileges over the set.

Input:

{
  "token": "",
  "set": "",
  "name?": "",
  "icon?": "",
  "delete?": false
}

Output:

{ "success": true }

v1/updateSubset: Update or delete subset

Updates the details of the given subset or deletes it. Requires admin privileges over the set.

Input:

{
  "token": "",
  "subset": "",
  "name?": "",
  "delete?": false
}

Output:

{ "success": true }

v1/kick: Kick a user from a set

Kicks a user from a set. Requires admin privileges over the set.

Input:

{
  "token": "",
  "set": "",
  "uid": ""
}

Output:

{ "success": true }