Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vinceh121/jskolengo

Unofficial Java wrapper for the new Skolengo mobility API
https://github.com/vinceh121/jskolengo

api-wrapper jsonapi skolengo

Last synced: 2 months ago
JSON representation

Unofficial Java wrapper for the new Skolengo mobility API

Awesome Lists containing this project

README

        



Unofficial Java wrapper for the new Skolengo mobility API

Part of The Rabbit Team: https://discord.gg/9u69mxsFT6

## Using
Use this [Maven repository](https://maven.vinceh121.me/#/snapshots)
```xml

vinceh121-snapshots
vinceh121's Maven repository
https://maven.vinceh121.me/snapshots

```

And add this [dependency](https://maven.vinceh121.me/#/snapshots/me/vinceh121/jskolengo/wrapper)
```xml

me.vinceh121.jskolengo
wrapper
0.0.1-SNAPSHOT

```

Example usage:
```java
JSkolengoAnonymous anon = new JSkolengoAnonymous();

// Collections by pagination, limit and offset
JSONAPIDocument> schools = anon.searchSchools("Jules Ferry", 0, 10);
System.out.println(schools);

// Collections by iterable
for (School sch : anon.searchSchools("Jules Ferry")) {
System.out.println(sch);
}

// Collections by Java Stream
anon.searchSchools("Jules Ferry").stream().forEach(System.out::println);

// Authenticated endpoints
JSkolengo sko = new JSkolengo();
sko.setBearerToken("aaa.bbb.ccc"); // JWT access token, obtained thought OpenID Connect, see https://github.com/maelgangloff/scolengo-token
sko.setEmsCode("entmip"); // See School#getEmsCode

sko.fetchAgendas(LocalDate.now(), LocalDate.now().plusDays(14)).stream().forEach(System.out::println);
```