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

outdated

TincanDart in an implmentation of the Tin Can API for the Dart 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
0
pub points
33%
popularity

Publisher

verified publisherjosephblough.com

TincanDart in an implmentation of the Tin Can API for the Dart language

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, http, http_parser, uuid

More

Packages that depend on tincan