-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
30 lines (24 loc) · 879 Bytes
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import 'package:tito_matcher/utils.dart';
Future<void> main() async {
final account = String.fromEnvironment('ACCOUNT_SLUG');
final event = String.fromEnvironment('EVENT_SLUG');
final token = String.fromEnvironment('TOKEN');
if (token.isEmpty || event.isEmpty || account.isEmpty) {
return;
}
// get all ti.to tickets
final List<Ticket> allTickets = await getTickets(
account: account,
event: event,
token: token,
);
// EXAMPLE: How to use
// Andrea
/// CSV headers "position;name;score"
final listToCSV_andrea = await mapTickets('./andrea.csv', allTickets);
await writeToCSV(list: listToCSV_andrea, fileName: 'andrea_generated');
// Robert
/// CSV headers "position;name;score"
final listToCSV_robert = await mapTickets('./robert.csv', allTickets);
await writeToCSV(list: listToCSV_robert, fileName: 'robert_generated');
}