Git Product home page Git Product logo

scolengo-api's Introduction

Hi 👋

I am Maël, a second year student at Polytech Nancy, part of the University of Lorraine in France. 👨‍🎓

Currently in a preparatory class integrated into an engineering school, I would like to become a computer engineer.

Passionate about cybersecurity, I think too many sites/infrastructures are not sufficiently secure and compromise the privacy of our personal data. Cybersecurity is for me one of the most important issues of today and tomorrow.

I currently hold the position of IT Project Manager at the Junior-Enterprise Polytech Services Nancy. The association aims to connect students and businesses through projects.

Email: [email protected] | More security information: security.txt
GPG fingerprint: 323E 63F1 AB87 9F30 B38F 5276 11FD C81C 24A7 F629

Profile views counter

🌐 Socials:

Discord status LinkedIn Twitter Reddit Stack Overflow Instagram Facebook

💻 Tech Stack:

TypeScript JavaScript Python PHP .Net C++ C# Insomnia JWT Laravel Symfony NodeJS React Yarn MySQL Ansible Docker

📊 GitHub Stats:

🏆 GitHub Trophies

💰 You can help me by Donating

BuyMeACoffee PayPal Ko-Fi
If you have too much money or just want to help me make the world of tomorrow a better place, you are free to make a donation (it will probably end up in the purchase of a packet of pasta 😉).

scolengo-api's People

Contributors

lolocomotive avatar maelgangloff avatar nonozgytb avatar vilerio avatar vinceh121 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scolengo-api's Issues

Participation au projet

Bonjour,
Je serais éventuellement intéressé pour participer au projet.
J'ai rejoins le serveur discord mais je n'ai aucune permission pour lire ou participer.
@maelgangloff es ce que tu peut faire quelque chose?

Merci

Erreur "PRONOTE_RESOURCES_NOT_READY" lors de la récupération des évaluations

Lorsque je souhaite utiliser la fonction getEvaluation(), de la façon suivante :

Skolengo.fromConfigObject(config).then(async user => {
  const infoUser = await user.getUserInfo()
  const studentId = infoUser.id;
  const periodId = '1'; 

  const limit = 20; 
  const offset = 0;
  const notes = await user.getEvaluation(studentId, periodId, limit, offset);
  console.log('Voici les notes :', notes);
}).catch((error) => {
  console.error('Une erreur s\'est produite :', error);
});

J'obtiens l'erreur suivante (chemins d'accès modifiés, ils sont à la base absolus) :

PRONOTE_RESOURCES_NOT_READY: Pronote resources are not yet ready, please try again in 500 ms
    at Skolengo.request (./node_modules/scolengo-api/dist/index.js:926:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Skolengo.getEvaluation (./node_modules/scolengo-api/dist/index.js:349:52)
    at async ./main.js:38:17 {
  status: '503',
  detail: 'Pronote resources are not yet ready, please try again in 500 ms'
}

Pour reproduire le problème :
Le code que j'ai testé est :

Skolengo.fromConfigObject(config).then(async user => {
  const infoUser = await user.getUserInfo()
  const studentId = infoUser.id;
  const periodId = '1'; 

  const limit = 20; 
  const offset = 0;
  const notes = await user.getEvaluation(studentId, periodId, limit, offset);
  console.log('Voici les notes :', notes);
}).catch((error) => {
  console.error('Une erreur s\'est produite :', error);
});

Résultat attendu
La liste des notes, en fonction des arguments passés à la fonction

Contexte additionnel
Version de la librairie : 1.2.0

Unauthorized 403

Is your feature request related to a problem? Please describe.
Authentication

Describe the solution you'd like
After 2 years without any problem of authentication, currently, i received 403 http code and it's not possible to use its api anymore.
I have not migrate to new api but I have tried using scolengo and the same 403.

Describe alternatives you've considered
no workaround possible

Any ideas?

Gérer les erreurs HTTP

Certaines requêtes génèrent des erreurs. Dans ces cas, il est d'usage de retourner un message explicite d'erreur en fonction des cas possibles.

Par exemple, l'endpoint concernant les absences peut retourner une erreur si l'établissement de l'utilisateur utilise Pronote pour la gestion des absences. Cette erreur l'invite à réessayer la requête après un certain temps.

Exemple d'erreur Pronote lors d'une demande de la liste des absences :

{
    "errors": [
        {
            "status": "503",
            "title": "PRONOTE_RESOURCES_NOT_READY",
            "detail": "Pronote resources are not yet ready, please try again in 500 ms"
        }
    ]
}

Merci à @mateo08c d'avoir partagé ce message d'erreur.

Rédiger une définition OpenAPI

Rédiger un fichier de définition OpenAPI. Cette spécification permettra d'en comprendre davantage son fonctionnement et aidera à son implémentation dans d'autres projets.

Exporter l'agenda au format iCalendar

Permettre de télécharger l'agenda au format iCalendar (Type MIME: text/calendar).
Ce format est standardisé (proposé par la RFC 5545) et permet l'importation de calendrier dans de nombreux logiciels (Google Agenda par exemple).

New scrapped API changes to includes

  • homework-assignments: specifying fields[homework]=title,done,dueDateTime&fields[subject]=label,color is mandatory, unless the API fails with an NPE
  • homework-assignments/:homeworkId: include teacher.person was removed. I don't think keeping it is an issue?
  • users-mail-settings/:userId: includes 'contacts', 'contacts.person', 'contacts.personContacts' were removed. Might be an issue?
  • schools-info: include attachments was removed. Might not be an issue?

Note that the following endpoints were untested:

  • POST communications
  • GET absence-files/:folderId

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.