Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client): generateGradesReportPDF #36

Merged
merged 3 commits into from
May 16, 2024
Merged

feat(client): generateGradesReportPDF #36

merged 3 commits into from
May 16, 2024

Conversation

Vexcited
Copy link
Member

  • Allows to get the grades report PDF URL for a given period.
  • Add getters for available periods for grades report.
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

@Vexcited Vexcited added the enhancement New feature or request label May 16, 2024
@Vexcited Vexcited added this to the 0.21.0 milestone May 16, 2024
@Vexcited Vexcited self-assigned this May 16, 2024
@Vexcited Vexcited linked an issue May 16, 2024 that may be closed by this pull request
@Vexcited Vexcited merged commit 0ce87ff into main May 16, 2024
@Vexcited Vexcited deleted the grades/pdf branch May 16, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(grades): add support to get a report (bulletin) from a period
1 participant