Season Service - Gnome-Lackey/mtglm-docs GitHub Wiki
Contracts
POST Season PUT Season GET All Seasons GET Season DELETE Season
[POST] /seasons
Create a new season
Request Body
{
endedOn?: string;
isActive: boolean;
players: string[];
set: string;
startedOn: string;
}
Request Headers
{
Authorization: Bearer Identity Token;
}
Response Body
{
status: number;
data: {
endedOn?: string;
id: string;
isActive: boolean;
startedOn: string;
}
}
[PUT] /seasons/{season_id}
Update a existing season
Request Body
{
endedOn?: string;
isActive?: boolean;
players?: string[];
set?: string;
startedOn?: string;
}
Request Headers
{
Authorization: Bearer Identity Token;
}
Response Body
{
status: number;
data: {
endedOn?: string;
id: string;
isActive: boolean;
startedOn: string;
}
}
[GET] /seasons
Get all seasons, or query all seasons
Query Parameters
For more information on how to use queries with this endpoint, see our service query FAQ page in the wiki.
| Parameter | Data type | Examples |
|---|---|---|
| active | boolean | ?active=false |
Request Headers
{
Authorization: Bearer Identity Token;
}
Response Body
{
status: number;
data: [
{
endedOn?: string;
id: string;
isActive: boolean;
startedOn: string;
},
...
]
}
[GET] /seasons/{season id}
Get an existing season
Request Headers
{
Authorization: Bearer Identity Token;
}
Response Body
{
status: number;
data: {
endedOn?: string;
id: string;
isActive: boolean;
startedOn: string;
}
}
[DELETE] /seasons/{season id}
Remove an existing season
Request Headers
{
Authorization: Bearer Identity Token;
}
Response Body
{
status: number;
data: {
message: string;
}
}