zmoog / classeviva Goto Github PK
View Code? Open in Web Editor NEWClasseviva CLI and library written in Golang
License: MIT License
Classeviva CLI and library written in Golang
License: MIT License
Something like:
$ classeviva version
classeviva v0.1.2
For example:
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
Grades and possibly other data are archived by period ("quadrimestre", in Italy).
Filter grades by period is needed.
For example:
$ classeviva grades list
[
{
"subjectDesc": "ITALIANO",
"evtDate": "2022-04-11",
"decimalValue": 9.25,
"displayValue": "9+",
"color": "green",
"skillValueDesc": " ",
"notesForFamily": "verifica grammatica (soggetto-predicati)"
},
...
]
The last successful execution happened on Mac 15, 2023. After this date, every time I try to access the API I get the following error:
$ classeviva grades list
Error: fetcher: failed to fetch identity (status_code: 400)
I tried to repeat the API call with an HTTP client, and here's the full response:
{
"statusCode": 400,
"error": "203:CvvRestApi/unrecognized apikey"
}
It seems the following HTTP header is no longer valid:
req.Header.Add("Z-Dev-Apikey", "+zorro+")
Explore options like macOS keychain.
When I run the tool on a cloud provider 1 I get the following error:
$ classeviva grades list -d
DEBU[0000] Looking for an existing identity..
DEBU[0000] settings path is: [/home/azureuser/.classeviva]
DEBU[0000] identity file [/home/azureuser/.classeviva/identity.json] does not exist
DEBU[0000] exists: false
DEBU[0000] expire
DEBU[0000] now2022-05-03T20:28:23Z
DEBU[0000] fetching new identity
TRAC[0000] <HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://web.spaggiari.eu/rest/v1/auth/login/" on this server.<P>
Reference #18.a6b93554.1651609703.877e15
</BODY>
</HTML>
Error: invalid character '<' looking for beginning of value
Usage:
classeviva grades list [flags]
Flags:
-h, --help help for list
-l, --limit int Limit number of results (default 3)
Global Flags:
-d, --debug Print debug information
-f, --format string Output format (default "text")
invalid character '<' looking for beginning of value
The issue is caused by the HTML response instead of JSON, but the error is not helping.
the root cause is https://web.spaggiari.eu not allowing source IP addresses from cloud providers (tested on AWS and Azure). โฉ
For example:
$ classeviva grades list --subject-like inglese
+------------+-------+-----------------+---------------------------------+
| DATE | GRADE | SUBJECT | NOTES |
+------------+-------+-----------------+---------------------------------+
| 2022-05-09 | 8- | INGLESE | |
+------------+-------+-----------------+---------------------------------+
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.