-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for Noticeboards #27
Comments
How to list the Noticeboards$ curl \
-H "User-Agent: CVVS/std/4.2.3 Android/12" \
-H "Z-Dev-Apikey: Tg1NWEwNGIgIC0K" \
-H "Z-Auth-Token: $CLASSEVIVA_TOKEN" \
https://web.spaggiari.eu/rest/v1/students/$CLASSEVIVA_STUDENT_ID/noticeboard/ | jq
{
"items": [
{
"pubId": 20135156,
"pubDT": "2024-03-08T16:48:36+01:00",
"readStatus": false,
"evtCode": "CF",
"cntId": 7694771,
"cntValidFrom": "2024-03-08",
"cntValidTo": "2024-04-23",
"cntValidInRange": true,
"cntStatus": "active",
"cntTitle": "CIRC. 298 - SIMULAZIONE PRIMA PROVA ESAME DI STATO ",
"cntCategory": "Circolare",
"cntHasChanged": false,
"cntHasAttach": true,
"needJoin": false,
"needReply": false,
"needFile": false,
"needSign": false,
"evento_id": "7694771",
"dinsert_allegato": "2024-03-08 16:48:32",
"attachments": [
{
"fileName": "298_Simulazione prima prova Esame di Stato.pdf",
"attachNum": 1
}
]
}, |
The current I need to refactor the grade code into a component (GradeReceiver?) to make add more components more manageable. |
To download the noticeboards attachment, we need two API calls. First, we need to set the attachment as "read", and then we can download it:
|
To download an attachment, need to GET the following resource:
For example, given the following noticeboard: {
"pubId": 13863460,
"pubDT": "2024-01-09T14:36:39+01:00",
"readStatus": true,
"evtCode": "CF",
"cntId": 5107079,
"cntValidFrom": "2024-01-09",
"cntValidTo": "2024-05-31",
"cntValidInRange": true,
"cntStatus": "active",
"cntTitle": "CIRC. 221 - PROGETTO CITIES GAMES",
"cntCategory": "Circolare",
"cntHasChanged": false,
"cntHasAttach": true,
"needJoin": false,
"needReply": false,
"needFile": false,
"needSign": false,
"evento_id": "5107079",
"dinsert_allegato": "2024-01-09 14:36:38",
"attachments": [
{
"fileName": "221_1_Programma per scuole.pdf",
"attachNum": 1
},
{
"fileName": "221_PROGETTO CITIES GAMES.pdf",
"attachNum": 2
}
]
} Here are the HTTP requests to download the two attachments:
|
Classeviva does not allow download of unread noticeboard items. So the next step is to set an item as read before downloading it. The endpoint to set the read status is:
|
Noticeboards contains updates from the school. Staying on top of updates is essentials, so I need to make reading them as effortless as possible.
I want to:
The Noticeboard API docs are available at https://github.com/Lioydiano/Classeviva-Official-Endpoints/tree/master/Noticeboard
The text was updated successfully, but these errors were encountered: