lib_smilingschool 1.0.0 copy "lib_smilingschool: ^1.0.0" to clipboard
lib_smilingschool: ^1.0.0 copied to clipboard

An Infomentor API client written in Dart

example/lib_smilingschool.dart

import 'dart:io';
//import 'package:intl/intl.dart';
import 'package:lib_smilingschool/lib_smilingschool.dart';
//import 'package:lib_smilingschool/src/api/models/notifications.models.dart';

void main() async {
  stdout.write("User >");
  var user = stdin.readLineSync() ?? "";
  stdout.write("Pass >");
  var pass = stdin.readLineSync() ?? "";
  // DEBUG
  //print('$user | $pass');
  InfoMentor client;
  client = await StockholmSTU().loginCredentials(user, pass);
  var isAuthenticated = await client.authentication?.isAuthenticated();
  print(isAuthenticated ?? false);

  /*print((await client.timetable?.getTimetableList(
          -120,
          DateTime.fromMillisecondsSinceEpoch(1727107913000),
          DateTime.fromMillisecondsSinceEpoch(1727539913000)))
      ?.first
      .toJson());*/

  /*print((await client.notifications
          ?.updateNotificationState([48572524], NotificationState.unread))
      ?.toJson());

  print((await client.notifications?.getNotifications())
      ?.notifications
      ?.first
      .toJson());
  print((await client.notifications?.appData())?.translations?.toJson());

  print((await client.account?.preferencesAppData())?.privacyUrl);*/
  print((await client.documentation?.appData())?.tabs);
}
1
likes
115
points
28
downloads

Publisher

verified publisherspamix.se

Weekly Downloads

An Infomentor API client written in Dart

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-4-Clause (license)

Dependencies

cookie_jar, dio, dio_cookie_manager, intl, json_annotation

More

Packages that depend on lib_smilingschool