-
Notifications
You must be signed in to change notification settings - Fork 0
/
ParseSpreadsheet.dart
39 lines (35 loc) · 1.19 KB
/
ParseSpreadsheet.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
31
32
33
34
35
36
37
38
39
import 'dart:async';
// import 'dart:io';
// import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:av_app/auth_helper.dart';
class ParseRegistrationsSheet {
void parse() async {
Map<String, String>? h = await AuthHelper.authenticate();
var v = await http.get(
Uri.parse(
// this should work, but it doesn't :(
"https://script.google.com/macros/s/AKfycbz8gUht2wTEckxY6CFKEI38YbxArqDC2xVL0dPQXhY/dev",
// ...but it works with this -- weird!
//"https://jsonplaceholder.typicode.com/albums/1",
),
headers: h,
);
return;
}
// Future<String> getDataFromGoogleSheet(var h) async {
// http.Response data = await http.get(
// Uri.parse(
// //"https://script.google.com/macros/s/AKfycbz8gUht2wTEckxY6CFKEI38YbxArqDC2xVL0dPQXhY/dev",
// //"https://script.google.com/macros/s/AKfycbxE6-AxajgO0kcVuBE8Ra5A4rBSCB10SNA5l7yrjcOUFnHztOfGhjMX81UVVHDDtFZm/exec",
// "https://seznam.cz",
// ),
// //headers: h,
// );
// dynamic jsonAppData = jsonDecode(data.body);
// return '';
// }
// DateTime _convertDateFromString(String date) {
// return DateTime.parse(date);
// }
}