Start adding user API calls

This commit is contained in:
zontreck 2024-07-10 03:10:05 -07:00
parent 15d80c1ab3
commit 8cbf2466cf
4 changed files with 68 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import 'package:libac_dart/discord/structures/application.dart';
import 'endpoints.dart';
class ApplicationPacket {
/// This will request the current application instance.
static Future<Application> getCurrentApplication() async {
Dio dio = Dio();
var reply = await dio.get(
@ -15,6 +16,7 @@ class ApplicationPacket {
return Application.fromJson(jsonReply);
}
/// This will update the current application instance.
static Future<Application> updateApplication(EditApplication app) async {
Dio dio = Dio();
var reply = await dio.patch(