0 purchases
tincan
A Dart library of the Tin Can API (also known as xAPI) #
For more information about the Tin Can API visit:
http://tincanapi.com/
Installation: #
In your pubspec.yaml
dependencies:
tincan: ^2.1.3
copied to clipboard
Sample Usage: #
In your code:
import 'package:tincan/tincan.dart';
final lrs = RemoteLRS(
endpoint: 'https://my.lrs.provider',
username: 'account key or user name',
password: 'account secret or password',
);
final statement = Statement(
actor: Agent(
mbox: 'mailto:[email protected]',
name: 'Test Agent',
),
verb: Verb(
id: 'http://adlnet.gov/expapi/verbs/experienced',
display: {'en-US': 'experienced'},
),
object: Activity(
id: 'http://tincanapi.com/TinCanDart/Test/Unit/0',
definition: ActivityDefinition(
type: 'http://id.tincanapi.com/activitytype/unit-test',
name: {'en-US': 'TinCanDart Tests: Unit 0'},
description: {
'en-US': 'Unit test 0 in the test suite for the Tin Can Dart library.'
},
),
),
);
lrs.saveStatement(statement);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.