Skip to content

Instantly share code, notes, and snippets.

@Litarvan
Created December 13, 2019 23:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Litarvan/ec666fa544f6d036e515867d0f266ca7 to your computer and use it in GitHub Desktop.
Save Litarvan/ec666fa544f6d036e515867d0f266ca7 to your computer and use it in GitHub Desktop.
Exemple de sortie de l'API Pronote
{
"name": "NAVRATIL Adrien",
"studentClass": "TS 5",
"marks": [
{
"_comment": "Chaque entrée du tableau correspond à un trimestre"
},
{
"period": 1,
"marks": [
{
"_comment": "Chaque entrée du tableau correspond à une matière"
},
{
"name": "ANGLAIS LV1",
"average": 18.5,
"studentClassAverage": 11.02,
"maxAverage": 19.46,
"minAverage": 2,
"marks": [
{
"subject": "ANGLAIS LV1",
"title": "Interro surprise huhu",
"value": 18,
"away": false,
"_comment": "'away' est à true si la note est N. Noté ou Abs.",
"max": 20,
"average": 8.4,
"coefficient": 1,
"higher": 19,
"lower": 2,
"time": 1568836800000,
"period": 1,
"__comment": "'period' Correspond au trimestre de la note"
},
{
"subject": "ANGLAIS LV1",
"title": "Devoir maison",
"value": 19,
"away": false,
"max": 20,
"average": 13.16,
"coefficient": 1,
"higher": 19,
"lower": 5,
"time": 1570737600000,
"period": 1
}
]
},
{
"name": "MATHEMATIQUES",
"average": 17.33,
"studentClassAverage": 11.71,
"maxAverage": 19,
"minAverage": 7.17,
"marks": [
{
"subject": "MATHEMATIQUES",
"title": "DS Artihmétique",
"value": 8.5,
"away": false,
"max": 10,
"_comment": "max est à 10 donc la note est sur 10",
"average": 4.11,
"coefficient": 1,
"higher": 10,
"lower": 3,
"time": 1571169600000,
"period": 1
},
{
"subject": "MATHEMATIQUES",
"title": "DM °1",
"value": 17,
"away": false,
"max": 6,
"average": 4.16,
"coefficient": 1,
"higher": 5.75,
"lower": 2.75,
"time": 1572901200000,
"period": 1
},
{
"subject": "MATHEMATIQUES",
"title": "",
"value": 18,
"away": false,
"max": 20,
"average": 12,
"coefficient": 1,
"higher": 18,
"lower": 4.75,
"time": 1572901200000,
"period": 1
}
]
}
],
"averages": {
"student": 17.8,
"studentClass": 13.15
}
}
],
"timetable": [
{
"_comment": "Chaque objet du tableau est une semaine, il contient normalement la semaine actuelle + la prochaine"
},
{
"time": 1548126000000,
"_comment": "'time' ici correspond à Lundi minuit environ",
"content": [
{
"subject": "MATHEMATIQUES",
"teacher": "JEAN-PROF P.",
"from": 1574658000000,
"to": 1574661600000,
"room": "102",
"away": false,
"cancelled": false
},
{
"subject": "ANGLAIS LV1",
"teacher": "ELIZABETH II.",
"from": 1574661600000,
"to": 1574672400000,
"room": "104",
"away": true,
"cancelled": false
},
{
"subject": "MATHEMATIQUES",
"teacher": "JEAN-PROF P.",
"from": 1574672400000,
"to": 1574676000000,
"room": "102",
"away": false,
"cancelled": false
},
{
"_comment": "etc........"
}
]
},
{
"time": 1548730800000,
"content": [
{
"subject": "MATHEMATIQUES",
"teacher": "JEAN-PROF P.",
"from": 1575262800000,
"to": 1575266400000,
"room": "102",
"away": false,
"cancelled": false
},
{
"subject": "ANGLAIS LV1",
"teacher": "ELIZABETH II.",
"from": 1575266400000,
"to": 1575277200000,
"room": "104",
"away": true,
"cancelled": false
},
{
"subject": "MATHEMATIQUES",
"teacher": "JEAN-PROF P.",
"from": 1575277200000,
"to": 1575280800000,
"room": "102",
"away": false,
"cancelled": false
},
{
"_comment": "etc........"
}
]
}
],
"homeworks": [
{
"subject": "MATHEMATIQUES",
"content": "Démontrer la conjecture de Syracuse sur feuille",
"since": 1574024400000,
"until": 1574629200000,
"toGive": true,
"_comment": "Le _toGive signifie que la case 'à rendre sur feuille' a été cochée par le prof",
"files": [
{
"name": "Comment_faire.pdf",
"url": "http://url-stylee-pronote/FichiersExternes/g763fh76ey7ze7tert/wouhou.pdf?Session=574357"
}
]
},
{
"subject": "ANGLAIS LV1",
"content": "Résoudre le problème du Brexit",
"since": 1574370000000,
"until": 1574629200000,
"toGive": false
}
],
"periods": [
{
"name": "Trimestre 1",
"from": 1567371600000,
"to": 1574546400000,
"period": true,
"id": 1,
"isDefault": true,
"_comment": "isDefault: true signifie que c'est le trimestre actuel, period: true signifie que c'est un Trimestre (l'id est alors positif)"
},
{
"name": "Trimestre 2",
"from": 1574632800000,
"to": 1583013600000,
"period": true,
"id": 2
},
{
"name": "Trimestre 3",
"from": 1583100000000,
"to": 1593810000000,
"period": true,
"id": 3
},
{
"name": "Semestre 1",
"from": 1567371600000,
"to": 1579384800000,
"id": -1
},
{
"name": "Semestre 2",
"from": 1579471200000,
"to": 1593810000000,
"id": -2
},
{
"name": "Année continue",
"from": 1567371600000,
"to": 1593810000000,
"id": -3
},
{
"name": "Bac blanc",
"from": 1567371600000,
"to": 1593810000000,
"id": -4
},
{
"name": "Brevet blanc",
"from": 1567371600000,
"to": 1593810000000,
"id": -5
},
{
"name": "Hors période",
"from": 1567371600000,
"to": 1593810000000,
"id": -6
},
{
"name": "Contrôle en cours de formation",
"from": 1567371600000,
"to": 1593810000000,
"id": -7
}
],
"reports": [
{
"_comment": "Un objet par trimestre"
},
{
"period": 1,
"subjects": [
{
"name": "MATHEMATIQUES",
"average": 17.33,
"studentClassAverage": 11.71,
"maxAverage": 19,
"minAverage": 7.17,
"comment": "Aucun problème avec ses tables de multiplication, rien à redire",
"coefficient": 9
},
{
"name": "ANGLAIS LV1",
"average": 18.5,
"studentClassAverage": 11.02,
"maxAverage": 19.46,
"minAverage": 2,
"comment": "Hi spiks ingliche vairie ouel!!",
"coefficient": 3
}
],
"averages": {
"student": 17.08,
"studentClass": 13.15
},
"comments": [
{
"_comment": "Les titres sont pas forcément ceux-là",
"title": "Apprécitiation globale",
"value": "Un élève qui existe, et a une forme physique constituée de matière, incroyable"
},
{
"title": "Distinction",
"value": "Félicitations"
}
]
}
],
"absences": [
{
"_comment": "Chaque entrée du tableau est un trimestre"
},
{
"period": 1,
"absences": [
{
"from": 1570446000000,
"to": 1570449600000,
"solved": true,
"justified": true,
"reason": "RDV EXTERIEUR SPECIALISTE"
},
{
"from": 1575525600000,
"to": 1575626400000,
"solved": true,
"justified": true,
"reason": "PROBLEME DE TRANSPORT"
}
]
}
],
"menu": [
[
"Une entrée sûrement très bonne",
"Une autre probablement bonne aussi"
],
[
"Un plat délicieux",
"Un autre plat sûrement de même"
],
[
"Un dessert succulent",
"Un autre qui l'est aussi"
]
],
"files": [
{
"time": 1574024400000,
"subject": "MATHEMATIQUES",
"name": "Comment_faire.pdf",
"url": "http://url-stylee-pronote/FichiersExternes/g763fh76ey7ze7tert/wouhou.pdf?Session=574357"
}
],
"infos": [
{
"time": 1574370000000,
"title": "Procédure d'évacuation en cas d'incendie",
"teacher": "MACRON E. (CPE)",
"content": "Mercredi à 11h, aura lieu un entraînement à la procédure d'évatuation incendie, merci de ne pas foutre le zbeul\n Cordialement",
"files": [
{
"name": "Procédure.pdf",
"url": "http://url-stylee-pronote/FichiersExternes/sd3y57tyert53tr/Procédure.pdf?Session=574357"
}
]
}
],
"avatar": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA......... (PNG en base 64)"
}
@Porggg
Copy link

Porggg commented Apr 2, 2020

Hey,
How can we convert the weird writing of "time" in a most convenient format ?

@Litarvan
Copy link
Author

Litarvan commented Apr 3, 2020

Weird writing ? It's just a Unix timestamp in milliseconds, the most common time format used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment