change: sar rework, improved

This commit is contained in:
Kwoth
2024-11-17 23:36:11 +00:00
parent d7fbf44d53
commit 0a9d53d380
30 changed files with 8416 additions and 555 deletions

View File

@@ -5,6 +5,47 @@ using JsonSerializer = System.Text.Json.JsonSerializer;
namespace NadekoBot.Modules.Searches.Common.StreamNotifications.Providers;
public sealed class YoutubeProvide : Provider
{
private readonly IGoogleApiService _api;
private readonly IHttpClientFactory _httpFactory;
public override FollowedStream.FType Platform
=> FollowedStream.FType.Youtube;
public YoutubeProvide(IGoogleApiService api, IHttpClientFactory httpFactory)
{
_api = api;
_httpFactory = httpFactory;
}
public override async Task<bool> IsValidUrl(string url)
{
await Task.Yield();
// todo implement
return url.Contains("youtube.com");
}
public override Task<StreamData?> GetStreamDataByUrlAsync(string url)
{
return default;
}
public override Task<StreamData?> GetStreamDataAsync(string login)
{
var client = _httpFactory.CreateClient();
client.GetAsync()
return default;
}
public override Task<IReadOnlyCollection<StreamData>> GetStreamDataAsync(List<string> usernames)
{
return default;
}
}
public sealed class TwitchHelixProvider : Provider
{
private readonly IHttpClientFactory _httpClientFactory;