This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:http/http.dart' as http; | |
import 'package:spectrumhome/utils/system.dart'; | |
import 'package:spectrumhome/utils/notification_manager.dart' as manager; | |
const String defaultIP = "localhost:8181"; | |
String _ip = defaultIP; | |
const int requestDelay = 10; | |
const int threadTime = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public UntisAuthentication authenticate(String school, String user, String password) { | |
try { | |
JSONObject request = new JSONObject(); | |
request.put("method", "authenticate"); | |
JSONObject params = new JSONObject(); | |
params.put("user", user); | |
params.put("password", password); | |
params.put("client", "SchoolGuard/Beta"); |