easistent_client 0.1.1
easistent_client: ^0.1.1 copied to clipboard

An eAsistent client package

easistent_client #

An eAsistent client Flutter package

Usage #

// Login with username and password
var login = await EAsClient.userLogin('username', 'password');

// Or login with token
var login = await EAsClient.tokenLogin('refreshToken');

// Create the client
final client = EAsClient();

// If needed refresh the access token
if (login.accessToken.isExpired())
  login = await EAsClient.refreshToken(login);

// Get a timetable
final timetable = await client.getTimeTable(login, DateTime.now());

Shout-out #

A big shout-out to siggsy for helping me understand the API.