MDHtrappy / Pawnote

A purrfect API wrapper for Pronote.

Home Page:http://pawnote.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pawnote - A purrfect API wrapper for Pronote

A simple wrapper around Index-Education's Pronote internal API.

Note

This project is not affiliated with Index-Education or Pronote in any way.

Supported

Versions

  • 2022
  • 2023 (latest)

Warning

This package wasn't tested for versions before 2022, so if anything is not working, please open an issue about it and mention that it's probably a breaking change between versions.

Sessions

  • Encrypted
  • Compressed

Accounts

  • élève (student)
  • parent

A support for other accounts will be added in the future.

Authentication

  • By username and password (no ENT)
  • By username and token
  • By QR Code

Important

ENT native support is not and will never be supported by Pawnote, for the reason that implementing each of them with every specificities requires a lot of time and effort. It's a pain to implement and track; as a matter of fact, most of the issues on pronotepy - a similar project - are related to ENTs.

Note about demonstration servers

Credentials authentication works, but token authentication won't work. This is because demo servers doesn't save next-time tokens, even if it's able to generate them.

You can know if a server is a demo or not by getting the isDemo property on a Pronote instance. It returns a boolean that is true when the server is a demo.

Features

  • Timetable (per week and from/to dates)
  • Homework (per week and from/to dates)
    • Able to update status of an homework (done / not done)
  • Attachments
    • Able to generate URLs from API
  • Resources (per week and from/to dates)
  • Find Pronote instances using longitude and latitude
  • Get informations about an instance from its URL
  • Periods
  • Grades & Averages
    • Read periods using Pronote.readDefaultPeriodForGradesOverview() and Pronote.readPeriodsForGradesOverview()
  • Evaluations and Skills (= Acquisition)
    • Read periods using Pronote.readDefaultPeriodForEvaluations() and Pronote.readPeriodsForEvaluations()
  • Personal informations
  • Custom fetcher to call the API with another API than fetch
  • Send Presence requests to keep alive the connection
    • Manually setup : Pronote.startPresenceRequests() and Pronote.stopPresenceRequests()
  • News
    • Read content of informations and/or surveys
    • Update, edit and publish answers to surveys
    • Mark informations and/or surveys as read/unread
    • Acknowledge informations
  • Discussions
    • Read available discussions and categories
    • Read messages from a discussion
    • Fetch recipients of a message/discussion
  • Attendance : Absences, Punishments and Delays
    • Read periods using Pronote.readDefaultPeriodForAttendance() and Pronote.readPeriodsForAttendance()
  • Error handlers
    • PawnoteNetworkFail

Installation

Use your favorite package manager to install Pawnote from NPM.

# pnpm
pnpm add pawnote

# Yarn
yarn add pawnote

# npm
npm install pawnote

Documentation & Guides

You can find the documentation, some guides and small examples at pawnote.js.org for more informations about the API and how to use it.

If you need complete examples, then we got a lot of those in the examples folder, hoping you can find your joy in there.

If none of those are helpful, you can always open an issue to ask for help.

Resources

Without these very useful resources, I wouldn't be able to write this whole client by myself.

About

A purrfect API wrapper for Pronote.

http://pawnote.js.org/

License:GNU General Public License v3.0


Languages

Language:TypeScript 99.5%Language:JavaScript 0.5%