This repository has been archived on 2023-10-14. You can view files and clone it, but cannot push or open issues or pull requests.
canteenlib/example/canteenlib_example.dart

18 lines
533 B
Dart
Raw Normal View History

import 'package:canteenlib/canteenlib.dart';
2022-03-28 17:04:55 +02:00
void main(List<String> args) {
Canteen c = Canteen("https://kantyna.neco.cz");
c.login("uzivatel", "heslo").then((value) {
c.jidelnicekDen(den: DateTime.parse("2022-04-04")).then((t) async {
print(await c.ziskejKredit());
c.objednat(t.jidla[0]).then(
(value) {
t.jidla[0] = value; // divně udělané ale nic lepšího teď nevymyslím
print(t.jidla[0].objednano);
print(t.jidla[0].orderUrl);
},
);
});
});
}