Skip to content
88 changes: 88 additions & 0 deletions src/lib/api/live-services.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ import {
getSeasons,
getTOTDs,
getClubCampaigns,
getClubCampaignById,
getMyGroupRecords,
getMyPositionGroup,
getTopPlayersGroup,
getTopPlayersMap,
getTopGroupPlayersMap,
getSurroundingPlayersMap,
getClubRooms,
getClubRoomById,
getArcadeRooms,
getClubSkins,
getClubBucketById,
getClubs,
getClubById,
getClubCompetitions,
getClubActivitiesById,
getClubMembers,
getPlayerRankings,
getLeaderboardsAroundScore,
Expand Down Expand Up @@ -63,6 +70,19 @@ test('List club campaigns', async t => {
}
})

test('Get a specific club campaign', async t => {
try {
const response = await getClubCampaignById(
t.context.account.lv2liveAccessToken,
0,
6151
)
t.assert(response)
} catch (err) {
t.fail(JSON.stringify(err.response.data))
}
})

test('Get my group records', async t => {
try {
const response = await getMyGroupRecords(
Expand Down Expand Up @@ -160,6 +180,19 @@ test('Get club rooms', async t => {
}
})

test('Get a specific club room', async t => {
try {
const response = await getClubRoomById(
t.context.account.lv2liveAccessToken,
41,
766
)
t.assert(response)
} catch (err) {
t.fail(JSON.stringify(err.response.data))
}
})

test('Get arcade rooms', async t => {
try {
const response = await getArcadeRooms(t.context.account.lv2liveAccessToken)
Expand All @@ -169,6 +202,28 @@ test('Get arcade rooms', async t => {
}
})

test('List club skins', async t => {
try {
const response = await getClubSkins(t.context.account.lv2liveAccessToken)
t.assert(response)
} catch (err) {
t.fail(JSON.stringify(err.response.data))
}
})

test('Get a specific club bucket', async t => {
try {
const response = await getClubBucketById(
t.context.account.lv2liveAccessToken,
383,
100982
)
t.assert(response)
} catch (err) {
t.fail(JSON.stringify(err.response.data))
}
})

test('Get clubs', async t => {
try {
const response = await getClubs(t.context.account.lv2liveAccessToken)
Expand All @@ -178,6 +233,39 @@ test('Get clubs', async t => {
}
})

test('Get a specific club', async t => {
try {
const response = await getClubById(
t.context.account.lv2liveAccessToken,
383
)
t.assert(response)
} catch (err) {
t.fail(JSON.stringify(err.response.data))
}
})

test('List club competitions', async t => {
try {
const response = await getClubCompetitions(t.context.account.lv2liveAccessToken)
t.assert(response)
} catch (err) {
t.fail(JSON.stringify(err.response.data))
}
})

test('Get activities from a specific club', async t => {
try {
const response = await getClubActivitiesById(
t.context.account.lv2liveAccessToken,
383
)
t.assert(response)
} catch (err) {
t.fail(JSON.stringify(err.response.data))
}
})

test('Get club members', async t => {
try {
const response = await getClubMembers(t.context.account.lv2liveAccessToken, 1)
Expand Down
Loading