lyon1agendaclient 1.0.9 copy "lyon1agendaclient: ^1.0.9" to clipboard
lyon1agendaclient: ^1.0.9 copied to clipboard

A Dart library for retrieving Lyon 1 University agendas using Lyon1CasClient for authentication.

📅 lyon1agendaclient #

A Dart library for retrieving Lyon 1 University agendas using Lyon1CasClient for authentication.

✨ Features #

  • Retrieve agendas for Lyon 1 University using Lyon1CasClient for authentication.

⚙️ Installation #

Add the following to your project's pubspec.yaml file:

dependencies:
  lyon1agendaclient: any
  lyon1casclient: any

🔒 Usage #

Start by importing the required libraries:

import 'package:lyon1agendaclient/lyon1agendaclient.dart';
import 'package:lyon1casclient/lyon1casclient.dart';

Then, use the Lyon1AgendaClient class to retrieve agendas, authenticating with Lyon 1 CAS credentials using Lyon1CasClient:

void main() async {
  final Lyon1AgendaClient agendaClient = Lyon1AgendaClient.useLyon1Cas(Lyon1CasClient());
  final Agenda? agendaOpt = await agendaClient.getAgenda(id: 10069);
  //you can allso ask to fetch automatically the ids
  // final Agenda? agendaOpt2 = await agendaClient.getAgenda(ids: await agendaClient.getAgendaIds);

  if (agendaOpt == null) {
    // Handle gracefully
    return;
  }

  final Agenda agenda = agendaOpt;

  for (final Day day in agenda.days) {
    print(day.date.toString());

    for (final Event e in day.events) {
      print(e.name);
      print("\t${e.location} | ${e.teacher}");
      print("\t${e.start.toString()} -> ${e.end.toString()}");
    }
  }
}

Make sure to replace 10069 with the desired agenda ID.

0
likes
125
pub points
39%
popularity

Publisher

unverified uploader

A Dart library for retrieving Lyon 1 University agendas using Lyon1CasClient for authentication.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

copy_with_extension, dotenv, equatable, hive, icalendar_parser, lyon1casclient, requests_plus

More

Packages that depend on lyon1agendaclient