Added Nightbot integration. Changed from client credentials flow to implicit code grant flow.

This commit is contained in:
Tom
2024-08-11 21:22:37 +00:00
parent 13bb6a9aa8
commit 0ad063cebd
9 changed files with 260 additions and 23 deletions

View File

@ -1,3 +1,4 @@
using System.Net.Http.Formatting;
using System.Net.Http.Json;
using System.Text.Json;
@ -44,6 +45,11 @@ namespace TwitchChatTTS.Helpers
return await _client.PostAsJsonAsync(uri, new object(), Options);
}
public async Task<HttpResponseMessage> Put<T>(string uri, T data)
{
return await _client.PutAsJsonAsync(uri, data, Options);
}
public async Task<T?> Delete<T>(string uri)
{
return await _client.DeleteFromJsonAsync<T>(uri, Options);