-
Notifications
You must be signed in to change notification settings - Fork 0
API Docs
Creates a new chat with request parameters
type Request = {
name?: string;
users?: string[]; // user ids
color?: string;
}
type Response = {
_id: string;
name?: string;
users?: string[]; // user ids
color?: string;
}
Fetch a chat with id chatId
type Response = {
_id: string;
name?: string;
users?: string[]; // user ids
color?: string;
}
Get all users
type Response = {
_id: string;
email: string; // unique
username: string;
tag: string;
bio: string;
status: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
friends: string[]; // ids
games: string[]; // id
pronouns: Pronouns; // HE_HIM (he-him), SHE_HER (she-her), THEY_THEM (they-them)
birthday?: {
day?: number;
month?: number;
year?: number;
};
language: string;
timezone: string;
avatarColor: string;
lobby?: string; // id
onboarded: boolean;
}[]
Get user information of the user that made the request (when signed in)
type Response = {
_id: string;
email: string; // unique
username: string;
tag: string;
bio: string;
status: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
friends: string[]; // ids
games: string[]; // id
pronouns: Pronouns; // HE_HIM (he-him), SHE_HER (she-her), THEY_THEM (they-them)
birthday?: {
day?: number;
month?: number;
year?: number;
};
language: string;
timezone: string;
avatarColor: string;
lobby?: string; // id
onboarded: boolean;
}
Get status of user with id userId
type Response = {
status: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
}
Get status of current user (this may no longer work)
type Response = {
status: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
}
Set status of current user
type Request = {
status: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
}
type Response = {
status: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
}
Get friends of current user
type Response = {
_id: string;
username?: string;
tag?: string;
pronouns: Pronouns; // HE_HIM (he-him), SHE_HER (she-her), THEY_THEM (they-them)
status?: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
bio?: string;
}[]
type Request = {
friendId: string;
}
type Response = {
_id: string;
email: string; // unique
username: string;
tag: string;
bio: string;
status: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
friends: string[]; // ids
games: string[]; // id
pronouns: Pronouns; // HE_HIM (he-him), SHE_HER (she-her), THEY_THEM (they-them)
birthday?: {
day?: number;
month?: number;
year?: number;
};
language: string;
timezone: string;
avatarColor: string;
lobby?: string; // id
onboarded: boolean;
}
Onboard a user
type Request = {
username: string;
games: string[]; // id
pronouns: Pronouns; // HE_HIM (he-him), SHE_HER (she-her), THEY_THEM (they-them)
birthday?: {
day?: number;
month?: number;
year?: number;
};
language: string;
timezone: string;
avatarColor: string;
}
type Response = {
_id: string;
email: string; // unique
username: string;
tag: string;
bio: string;
status: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
friends: string[]; // ids
games: string[]; // id
pronouns: Pronouns; // HE_HIM (he-him), SHE_HER (she-her), THEY_THEM (they-them)
birthday?: {
day?: number;
month?: number;
year?: number;
};
language: string;
timezone: string;
avatarColor: string;
lobby?: string; // id
onboarded: boolean;
}
Get all lobbies
type Response = {
_id: string;
name: string;
game: string;
hostId: string;
tags: string[];
numPlayers: number;
description: string;
requests: string[]; // ids
users: string[]; // ids
chat: string; // id
}[]
Create new lobby
type Request = {
_id: string;
name: string;
game: string;
hostId: string;
tags: string[];
numPlayers: number;
description: string;
requests: string[]; // ids
users: string[]; // ids
chat: string; // id
}[]
type Response = {
name: string;
game: string;
tags: string[];
numPlayers: number;
description: string;
requests: string[]; // ids
chat: string; // id
}
Get lobby details with id lobbyId
(this may be inaccurate)
type Response = {
_id: string;
name: string;
game: string;
hostId: string;
tags: string[];
numPlayers: number;
description: string;
requests: {
_id: string;
sender: {
_id: string;
username?: string;
tag?: string;
pronouns: Pronouns; // HE_HIM (he-him), SHE_HER (she-her), THEY_THEM (they-them)
status?: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
bio?: string;
},
message: string
}[]; // ids
users: {
_id: string;
username?: string;
tag?: string;
pronouns: Pronouns; // HE_HIM (he-him), SHE_HER (she-her), THEY_THEM (they-them)
status?: UserStatus; // ACTIVE (0), IDLE (1), DO_NOT_DISTRUB (2), OFFLINE (3)
bio?: string;
}[];
chat: string; // id
}
Delete lobby with id lobbyId
type Response = "Successful"
Create a lobby request with the sender id set as the user who made this request for a specific lobby with id lobbyId
type Request = {
message: string
}
type Response = { // updated lobby
_id: string;
name: string;
game: string;
hostId: string;
tags: string[];
numPlayers: number;
description: string;
requests: string[]; // ids
users: string[]; // ids
chat: string; // id
}
Host accepts request with request id requestId
for lobby with id lobbyId
type Response = { // updated lobby
_id: string;
name: string;
game: string;
hostId: string;
tags: string[];
numPlayers: number;
description: string;
requests: string[]; // ids
users: string[]; // ids
chat: string; // id
}
Host denies request with request id requestId
for lobby with id lobbyId
type Response = { // updated lobby
_id: string;
name: string;
game: string;
hostId: string;
tags: string[];
numPlayers: number;
description: string;
requests: string[]; // ids
users: string[]; // ids
chat: string; // id
}
Get all tags
type Response = {
_id: string;
name: string;
rainbow: boolean;
}[]
Create tag
type Request = {
name: string;
rainbow: boolean;
}
type Response = {
_id: string;
name: string;
rainbow: boolean;
}
Delete tag with id tagId
type Response = "Successful"
Get all tags
type Response = {
_id: string;
name: string;
image: string;
numPlayers: number[];
}[]
Create game
type Request = {
name: string;
image: string;
numPlayers: number[];
}
type Response = {
_id: string;
name: string;
image: string;
numPlayers: number[];
}
Delete tag with id gameId
type Response = "Successful"
type Request = {}
type Response = {}