tincan 2.1.3 copy "tincan: ^2.1.3" to clipboard
tincan: ^2.1.3 copied to clipboard

TinCanDart is an xAPI implementation for the Dart programming language

example/example.dart

import 'package:tincan/tincan.dart';

main() async {
  final lrs = RemoteLRS(
    endpoint: '',
    username: '',
    password: '',
  );

  final statements = await lrs.queryStatements(StatementsQuery(limit: 10));

  print('Statement count : ${statements.data?.statements?.length}');
  _printStatements(statements.data?.statements);
  print('more at ${statements.data?.moreUrl}');

  String? more = statements.data?.moreUrl;
  while (more != null) {
    _printStatements(statements.data?.statements);
    final moreStatements = (await lrs.moreStatements(more))!;
    print('more at ${moreStatements.data?.moreUrl}');
    more = moreStatements.data?.moreUrl;
  }
}

void _printStatements(List<Statement>? statements) {
  statements?.forEach((statement) {
    print('  Statement - ${statement.id}');
  });
}
2
likes
130
pub points
23%
popularity

Publisher

verified publisherjosephblough.com

TinCanDart is an xAPI implementation for the Dart programming language

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

crypto, http, http_parser, uuid

More

Packages that depend on tincan