https://github.com/litarvan/pronote-api-client-java
Client Pronote-API en Java
https://github.com/litarvan/pronote-api-client-java
Last synced: about 1 year ago
JSON representation
Client Pronote-API en Java
- Host: GitHub
- URL: https://github.com/litarvan/pronote-api-client-java
- Owner: Litarvan
- License: gpl-3.0
- Created: 2019-12-15T18:59:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-15T19:06:14.000Z (over 6 years ago)
- Last Synced: 2025-04-06T16:53:38.252Z (about 1 year ago)
- Language: Java
- Size: 72.3 KB
- Stars: 10
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pronote API Java client
Un client pour [l'API Pronote](https://github.com/Litarvan/pronote-api) en Java
## Import
### Gradle
```groovy
repositories {
maven {
url 'https://litarvan.github.io/maven'
}
}
dependencies {
implementation 'fr.litarvan:pronote-api:1.0.0'
}
```
### Maven
```xml
fr.litarvan
pronote-api
1.0.0
```
## Utilisation
La requête login est optionnelle, si elle n'est pas faite, la requête fetch la fera au passage.
Une erreur RequestException peut être lâchée par les deux fonctions en cas d'erreur de connexion ou de lecture.
Si une erreur autre que "Mauvais identifiants" est renvoyée, merci d'ouvrir une issue sur l'API Pronote.
```java
PronoteAPI api = new PronoteAPI("http://127.0.0.1:21727/");
try {
api.login(new LoginRequest("username", "password", "pronote url", "cas");
} catch (RequestException e) {
... // Mauvais identifiants
}
FetchResponse response = api.fetch(new FetchResponse("username", "password", "pronote url", "cas");
System.out.println(String.format("Welcome %s !", response.getName()));
```