# [ekreta-rs](https://codeberg.org/jark/ekreta-rs): [`E-Kréta`](https://www.e-kreta.hu/) api client in [Rust](https://rust-lang.org)
> [Magyar README](README.hu.md)
> ***WIP***: do expect breaking changes
> `E-Kréta` is an awful Hungarian electronic school administration system
## API
- `serde` `struct` bindings for following:
- [x] school fetching
- [x] token
- [x] user info fetch
- [x] evaluations/grades
- [x] timetable
- [x] messages
- [x] attachments
- [x] announced test
- [x] absences
- [x] classes/groups the user is a part of
## Disclaimer
logging is enabled using the `log` crate, mostly for requests in [account.rs](./src/account.rs),
those requests/responses contain sensitive data, such as `log::debug!("{token_json}");`.
It should be fine as long as you either:
- don't use a crate that logs: eg.: `env_logger`, `log4rs`, `fern`
- don't enable `log::LevelFilter::Debug` or higher
- don't store/share your/other's personal information without consent
## Secret weapons
- if you'd like to introduce a bug (in some cases, feature in others: see [rsfilc](https://codeberg.org/jark/rsfilc), when one would like to explicitly use the cache), which would make this crate unable to access the internet, export an env variable like following: one-time thing: `NO_NET=1 <BINARY, eg.: rsfilc>`
- `NO_RENAME=1` can be used to turn off renaming
## Dependents
This library is written to provide bindings between Rust and the E-Kréta REST API.
It's primarily (and only at this time) used in [`RsFilc`](https://codeberg.org/jark/rsfilc).
## Acknowledgements
### The API was written based on these documentations
- [bzcsalba/ekretadocs](https://github.com/bczsalba/ekreta-docs-v3)
- [nzx.hu/kreta-api](https://nzx.hu/kreta-api/), which is extremely helpful, and I'd especially like to thank it's [the creator](https://github.com/TheBlueLines), for letting us know about [this discord server](https://discord.com/invite/FraeswEMm7), where [csboo](https://codeberg.org/csboo) received help and written the new login API
- the undescribably ugly json structs were converted to rust with [this tool: transform.tools](https://transform.tools/json-to-rust-serde)