lib_smilingschool 1.1.0-pre.2 copy "lib_smilingschool: ^1.1.0-pre.2" to clipboard
lib_smilingschool: ^1.1.0-pre.2 copied to clipboard

An Infomentor API client written in Dart providing easy access to an api none of us truly understands

⚠️ Disclaimer ⚠️ #

We (edupatch) are not affiliated with or endorsed by Infomentor in any way

lib_smilingschool #

Pub Version

Infomentor API client written in Dart and built using Dio and json_serializable

Currently web is not supported because of CORS!

Features #

  • Is up to date with the Edupatch SmilingSchool API OpenAPI Spec
  • Converts all response data to native dart types to make usage easy!
  • You have access to the underlying Dio client in case you need to do special operations which the API is not capable of yet!
  • Every response object is serialized - use your response with ease!
  • Login systems are modular - switch em' all you want!

Getting started #

First add this package to your pubspec.yaml

Next import the package and initialize a client

import 'package:lib_smilingschool/lib_smilingschool.dart';

void main() async {
  var user = "USERNAME";
  var pass = "PASSWORD";
  InfoMentor client;
  // We Stockholm Student as the example system here
  client = await StockholmSTU().loginCredentials(user, pass);
  // Look, here we use the endpoint isAuthenticated in the authentication category of the API!
  var isAuthenticated = await client.authentication?.isAuthenticated();
  // Outputs true if you're authenticated, or false if null or false
  print(isAuthenticated ?? false);
}

That's it! You're now up and running.

If you are wondering about endpoints or such, please refer to the Edupatch SmilingSchool API OpenAPI Spec

2
likes
155
points
35
downloads

Publisher

verified publisherspamix.se

Weekly Downloads

An Infomentor API client written in Dart providing easy access to an api none of us truly understands

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