Alter networking to include authorization bot header, and add initial sticker calls
This commit is contained in:
parent
eae1f391de
commit
6079fa9a01
6 changed files with 95 additions and 6 deletions
|
@ -8,7 +8,7 @@ import 'endpoints.dart';
|
|||
class ApplicationPacket {
|
||||
/// This will request the current application instance.
|
||||
static Future<Application> getCurrentApplication() async {
|
||||
Dio dio = Dio();
|
||||
Dio dio = Dio(DiscordSessionSettings.getOptions);
|
||||
var reply = await dio.get(
|
||||
"${DiscordEndpoints.BaseURL}${DiscordEndpoints.Applications}${DiscordEndpoints.ME}");
|
||||
String jsonReply = reply.data as String;
|
||||
|
@ -18,7 +18,7 @@ class ApplicationPacket {
|
|||
|
||||
/// This will update the current application instance.
|
||||
static Future<Application> updateApplication(EditApplication app) async {
|
||||
Dio dio = Dio();
|
||||
Dio dio = Dio(DiscordSessionSettings.getOptions);
|
||||
var reply = await dio.patch(
|
||||
"${DiscordEndpoints.BaseURL}${DiscordEndpoints.Applications}${DiscordEndpoints.ME}",
|
||||
data: app.encode());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue