valorant-api-types
Version:
A collection of documented endpoints and return types for the unofficial Valorant API
38 lines • 1.53 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.matchHistoryEndpoint = void 0;
const zod_1 = require("zod");
const commonTypes_1 = require("../../commonTypes");
exports.matchHistoryEndpoint = {
name: 'Match History',
description: 'Get the match history for the given player',
queryName: 'MatchHistory_FetchMatchHistory',
category: 'PVP Endpoints',
type: 'pd',
suffix: 'match-history/v1/history/{puuid}',
query: new Map([
['startIndex', zod_1.z.number().optional().describe('The index of the first match to return. Defaults to 0')],
['endIndex', zod_1.z.number().optional().describe('The index of the last match to return. Defaults to 20')],
['queue', zod_1.z.string().optional().describe('The queue to filter by. Defaults to all queues')], // Not sure why this "as ZodType" is needed
]),
riotRequirements: {
token: true,
entitlement: true,
clientPlatform: true,
clientVersion: true
},
responses: {
'200': zod_1.z.object({
Subject: commonTypes_1.playerUUIDSchema,
BeginIndex: zod_1.z.number(),
EndIndex: zod_1.z.number(),
Total: zod_1.z.number(),
History: zod_1.z.array(zod_1.z.object({
MatchID: commonTypes_1.matchIDSchema,
GameStartTime: commonTypes_1.millisSchema,
QueueID: commonTypes_1.queueIDSchema
}))
})
}
};
//# sourceMappingURL=MatchHistory.js.map