-
Notifications
You must be signed in to change notification settings - Fork 0
Getting, creating, updating and deleting rune pages
dysolix edited this page Apr 17, 2024
·
2 revisions
const runePages = await client.request("get", "/lol-perks/v1/pages");
await client.request("post", "/lol-perks/v1/pages", {
body: {
name: "A new rune page",
primaryStyleId: 8300,
subStyleId: 8200,
selectedPerkIds: [8369, 8313, 8345, 8347, 8236, 8226, 5008, 5008, 5003],
current: true // Selects the rune page in the League client if true
} as any // Only these five properties are required, but because of the way the auto-generated types work, TypeScript doesn't know that :(
});
await client.request("delete", "/lol-perks/v1/pages/{id}", {
path: {
id: "123"
}
})
While there is an endpoint that replaces a specific rune page, I wouldn't recommend using it, because it doesn't show the changes in the League client. Instead delete the target rune page by it's id and create a new one.