Skip to content

Instantly share code, notes, and snippets.

View LenniCodes's full-sized avatar
🐟
fluttert davon

Lennard Kiesbauer LenniCodes

🐟
fluttert davon
View GitHub Profile
@LenniCodes
LenniCodes / Http Core
Created September 21, 2021 21:19
Http Core
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;
@LenniCodes
LenniCodes / gist:5b9832707860a536c1c9f51516e3f8e8
Last active September 20, 2021 18:26
WebUntis JavaAPI Wrap
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");