LiterateInk / Pawnote

A purrfect API wrapper for PRONOTE.
https://docs.literate.ink/pawnote
GNU General Public License v3.0
52 stars 11 forks source link

feat(client): `generateGradesReportPDF` #36

Closed Vexcited closed 4 months ago

Vexcited commented 4 months ago
const pronote = await authenticatePronoteCredentials("https://pronote-vm.dev/pronote", {
  accountTypeID: PronoteApiAccountId.Student,
  username: "lisa.boulanger",
  password: "12345678",

  // Because this is just an example, don't forget to change this.
  deviceUUID: "my-device-uuid"
});

const periods = pronote.readPeriodsForGradesReport();
const period = periods.find((period) => period.name === "Semestre 1");
if (!period) throw new Error("Period not found.");

console.log("Fetching for period:", period.name, "\n");
const reportURL = await pronote.generateGradesReportPDF(period);

console.log("Report URL:", reportURL);

image