From 72e9738f311ad4bb616774c4209babe77682a090 Mon Sep 17 00:00:00 2001 From: laurencee Date: Wed, 9 Feb 2022 12:55:48 +1000 Subject: [PATCH] Remove old twitch API calls Move last remaining v5 api call to helix, search games -> search categories --- .gitignore | 3 + ExternalAPIs.Tests/ExternalAPIs.Tests.csproj | 7 +- .../TwitchTvHelixClientShould.cs | 18 +++ ExternalAPIs.Tests/TwitchTvV3ClientShould.cs | 133 ------------------ ExternalAPIs.Tests/TwitchTvV5ClientShould.cs | 41 ------ ExternalAPIs/ExternalAPIs.csproj | 31 ---- ExternalAPIs/TwitchTv/Helix/Dto/TopGames.cs | 6 +- .../Helix/ITwitchTvHelixReadonlyClient.cs | 4 +- .../TwitchTv/Helix/RequestConstants.cs | 1 + .../Helix/TwitchTvHelixHelixReadonlyClient.cs | 17 ++- .../V3/Converters/SingleOrArrayConverter.cs | 34 ----- .../SingleOrArrayThumbnailConverter.cs | 28 ---- ExternalAPIs/TwitchTv/V3/Dto/Channel.cs | 60 -------- ExternalAPIs/TwitchTv/V3/Dto/ChannelLinks.cs | 28 ---- ExternalAPIs/TwitchTv/V3/Dto/Follow.cs | 11 -- ExternalAPIs/TwitchTv/V3/Dto/Fps.cs | 20 --- ExternalAPIs/TwitchTv/V3/Dto/Game.cs | 16 --- ExternalAPIs/TwitchTv/V3/Dto/PreviewImage.cs | 13 -- .../V3/Dto/QueryRoot/ChannelVideosRoot.cs | 13 -- .../TwitchTv/V3/Dto/QueryRoot/GamesRoot.cs | 9 -- .../TwitchTv/V3/Dto/QueryRoot/StreamRoot.cs | 10 -- .../TwitchTv/V3/Dto/QueryRoot/StreamsRoot.cs | 13 -- .../TwitchTv/V3/Dto/QueryRoot/TopGamesRoot.cs | 14 -- .../TwitchTv/V3/Dto/QueryRoot/UserFollows.cs | 13 -- ExternalAPIs/TwitchTv/V3/Dto/Resolutions.cs | 15 -- ExternalAPIs/TwitchTv/V3/Dto/Stream.cs | 32 ----- ExternalAPIs/TwitchTv/V3/Dto/Thumbnail.cs | 9 -- ExternalAPIs/TwitchTv/V3/Dto/TopGame.cs | 11 -- ExternalAPIs/TwitchTv/V3/Dto/Video.cs | 63 --------- .../TwitchTv/V3/ITwitchTvV3ReadonlyClient.cs | 33 ----- .../TwitchTv/V3/Query/ChannelVideosQuery.cs | 29 ---- ExternalAPIs/TwitchTv/V3/RequestConstants.cs | 18 --- .../TwitchTv/V3/TwitchTvV3V3ReadonlyClient.cs | 132 ----------------- ExternalAPIs/TwitchTv/V5/Dto/Box.cs | 20 --- ExternalAPIs/TwitchTv/V5/Dto/Game.cs | 25 ---- .../TwitchTv/V5/Dto/QueryRoot/GamesRoot.cs | 15 -- .../TwitchTv/V5/Dto/QueryRoot/TopGamesRoot.cs | 14 -- ExternalAPIs/TwitchTv/V5/Dto/TopGame.cs | 16 --- .../TwitchTv/V5/ITwitchTvV5ReadonlyClient.cs | 16 --- ExternalAPIs/TwitchTv/V5/RequestConstants.cs | 13 -- .../TwitchTv/V5/TwitchTvV5ReadonlyClient.cs | 51 ------- GlobalAssemblyInfo.cs | 4 +- Livestream.Monitor.sln | 1 + Livestream.Monitor/AppBootstrapper.cs | 2 - .../Model/ApiClients/ApiClientFactory.cs | 3 +- .../Model/ApiClients/TwitchApiClient.cs | 32 ++--- 46 files changed, 64 insertions(+), 1033 deletions(-) delete mode 100644 ExternalAPIs.Tests/TwitchTvV3ClientShould.cs delete mode 100644 ExternalAPIs.Tests/TwitchTvV5ClientShould.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Converters/SingleOrArrayConverter.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Converters/SingleOrArrayThumbnailConverter.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/Channel.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/ChannelLinks.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/Follow.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/Fps.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/Game.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/PreviewImage.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/ChannelVideosRoot.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/GamesRoot.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/StreamRoot.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/StreamsRoot.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/TopGamesRoot.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/UserFollows.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/Resolutions.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/Stream.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/Thumbnail.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/TopGame.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Dto/Video.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/ITwitchTvV3ReadonlyClient.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/Query/ChannelVideosQuery.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/RequestConstants.cs delete mode 100644 ExternalAPIs/TwitchTv/V3/TwitchTvV3V3ReadonlyClient.cs delete mode 100644 ExternalAPIs/TwitchTv/V5/Dto/Box.cs delete mode 100644 ExternalAPIs/TwitchTv/V5/Dto/Game.cs delete mode 100644 ExternalAPIs/TwitchTv/V5/Dto/QueryRoot/GamesRoot.cs delete mode 100644 ExternalAPIs/TwitchTv/V5/Dto/QueryRoot/TopGamesRoot.cs delete mode 100644 ExternalAPIs/TwitchTv/V5/Dto/TopGame.cs delete mode 100644 ExternalAPIs/TwitchTv/V5/ITwitchTvV5ReadonlyClient.cs delete mode 100644 ExternalAPIs/TwitchTv/V5/RequestConstants.cs delete mode 100644 ExternalAPIs/TwitchTv/V5/TwitchTvV5ReadonlyClient.cs diff --git a/.gitignore b/.gitignore index b06e864..06476f1 100644 --- a/.gitignore +++ b/.gitignore @@ -210,3 +210,6 @@ FakesAssemblies/ GeneratedArtifacts/ _Pvt_Extensions/ ModelManifest.xml + +# Credentials +twitchaccesstoken.local \ No newline at end of file diff --git a/ExternalAPIs.Tests/ExternalAPIs.Tests.csproj b/ExternalAPIs.Tests/ExternalAPIs.Tests.csproj index d3a809e..5a38649 100644 --- a/ExternalAPIs.Tests/ExternalAPIs.Tests.csproj +++ b/ExternalAPIs.Tests/ExternalAPIs.Tests.csproj @@ -69,10 +69,8 @@ - - @@ -87,6 +85,11 @@ + + + Always + + diff --git a/ExternalAPIs.Tests/TwitchTvHelixClientShould.cs b/ExternalAPIs.Tests/TwitchTvHelixClientShould.cs index 8b3de00..e027bf8 100644 --- a/ExternalAPIs.Tests/TwitchTvHelixClientShould.cs +++ b/ExternalAPIs.Tests/TwitchTvHelixClientShould.cs @@ -1,6 +1,7 @@ using System; using ExternalAPIs.TwitchTv.Helix; using System.Collections.Generic; +using System.IO; using System.Threading.Tasks; using ExternalAPIs.TwitchTv.Helix.Query; using Xunit; @@ -19,6 +20,13 @@ public class TwitchTvHelixClientShould private readonly TwitchTvHelixHelixReadonlyClient sut = new TwitchTvHelixHelixReadonlyClient(); + public TwitchTvHelixClientShould() + { + // create this file locally, it's already marked to be copied to the output in this test project + var twitchAccessToken = File.ReadAllText("twitchaccesstoken.local"); + sut.SetAccessToken(twitchAccessToken); + } + [Fact] public async Task GetUser() { @@ -97,5 +105,15 @@ public async Task GetChannelVideos(string userId) Assert.NotNull(channelVideos); Assert.NotEmpty(channelVideos.Videos); } + + [InlineData("League of Legends")] + [InlineData("Just Chatting")] + [Theory] + public async Task SearchCategories(string category) + { + var twitchCategories = await sut.SearchCategories(category); + Assert.NotNull(twitchCategories); + Assert.NotEmpty(twitchCategories); + } } } diff --git a/ExternalAPIs.Tests/TwitchTvV3ClientShould.cs b/ExternalAPIs.Tests/TwitchTvV3ClientShould.cs deleted file mode 100644 index 1ef71f9..0000000 --- a/ExternalAPIs.Tests/TwitchTvV3ClientShould.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using ExternalAPIs.TwitchTv.V3; -using ExternalAPIs.TwitchTv.V3.Query; -using Xunit; - -namespace ExternalAPIs.Tests -{ - [Obsolete] - public class TwitchTvV3ClientShould - { - private const string StreamName = "etup"; - private readonly TwitchTvV3ReadonlyClient sut = new TwitchTvV3ReadonlyClient(); - - [Fact] - public async Task GetFollowsFromUser() - { - var followedStreams = await sut.GetUserFollows(StreamName); - Assert.NotNull(followedStreams); - Assert.NotEmpty(followedStreams.Follows); - } - - [Fact] - public async Task GetChannelDetails() - { - var channelDetails = await sut.GetChannelDetails(StreamName); - Assert.NotNull(channelDetails); - } - - [Fact, Trait("Category", "LocalOnly")] - public async Task GetStreamDetailsForEtup() - { - var streamDetails = await sut.GetStreamDetails(StreamName); - Assert.NotNull(streamDetails); - } - - [Fact] - public async Task GetStreamsDetails() - { - var streamNames = new List(new [] - { - "massansc", - "esl_csgo", - "saintvicious" - }); - var streamsDetails = await sut.GetStreamsDetails(streamNames); - Assert.NotNull(streamsDetails); - Assert.NotEmpty(streamsDetails); - } - - [Fact] - public async Task GetTopGamesList() - { - var topGames = await sut.GetTopGames(); - Assert.NotNull(topGames); - Assert.NotEmpty(topGames); - - topGames.ForEach(x => - { - Assert.NotNull(x.Game); - Assert.NotNull(x.Game.Name); - }); - } - - [Fact, Trait("Category", "LocalOnly")] - public async Task FindStreamEtup() - { - var streamsResult = await sut.SearchStreams(StreamName); - Assert.NotNull(streamsResult); - Assert.NotEmpty(streamsResult); - } - - [Fact] - public async Task FindStreamsGivenPartialNames() - { - var streamsResult = await sut.SearchStreams("the"); - Assert.NotNull(streamsResult); - Assert.NotEmpty(streamsResult); - } - - [Fact] - public async Task FindGameMinecraft() - { - var gamesResult = await sut.SearchGames("Minecraft"); - Assert.NotNull(gamesResult); - Assert.NotEmpty(gamesResult); - } - - [Fact] - public async Task FindGameWoW() - { - var gamesResult = await sut.SearchGames("World of Warcraft"); - Assert.NotNull(gamesResult); - Assert.NotEmpty(gamesResult); - } - - [InlineData((string)null)] - [InlineData("World of Warcraft")] - [InlineData("Minecraft")] - [InlineData("League of Legends")] - [Theory] - public async Task GetTopStreams(string gameName) - { - var topStreamsQuery = new TopStreamQuery() { Skip = 0, Take = 100, GameName = gameName}; - var topStreams = await sut.GetTopStreams(topStreamsQuery); - Assert.NotNull(topStreams); - Assert.NotEmpty(topStreams); - - if (topStreamsQuery.GameName != null) - { - Assert.All(topStreams, stream => Assert.Contains(topStreamsQuery.GameName, stream.Game, StringComparison.OrdinalIgnoreCase)); - } - } - - [InlineData(StreamName, true, true)] - [InlineData(StreamName, true, false)] - [InlineData(StreamName, false, false)] - [Theory] - public async Task GetChannelVideos(string channelName, bool broadcastsOnly, bool hlsVodsOnly) - { - var channelVideosQuery = new ChannelVideosQuery() - { - ChannelName = channelName, - BroadcastsOnly = broadcastsOnly, - HLSVodsOnly = hlsVodsOnly, - }; - var channelVideos = await sut.GetChannelVideos(channelVideosQuery); - Assert.NotNull(channelVideos); - Assert.NotEmpty(channelVideos); - } - } -} diff --git a/ExternalAPIs.Tests/TwitchTvV5ClientShould.cs b/ExternalAPIs.Tests/TwitchTvV5ClientShould.cs deleted file mode 100644 index 44dc6eb..0000000 --- a/ExternalAPIs.Tests/TwitchTvV5ClientShould.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Threading.Tasks; -using ExternalAPIs.TwitchTv.V5; -using Xunit; - -namespace ExternalAPIs.Tests -{ - public class TwitchTvV5ClientShould - { - private readonly TwitchTvV5ReadonlyClient sut = new TwitchTvV5ReadonlyClient(); - - [Fact] - public async Task GetTopGamesList() - { - var topGames = await sut.GetTopGames(); - Assert.NotNull(topGames); - Assert.NotEmpty(topGames); - - topGames.ForEach(x => - { - Assert.NotNull(x.Game); - Assert.NotNull(x.Game.Name); - }); - } - - [Fact] - public async Task FindGameMinecraft() - { - var gamesResult = await sut.SearchGames("Minecraft"); - Assert.NotNull(gamesResult); - Assert.NotEmpty(gamesResult); - } - - [Fact] - public async Task FindGameWoW() - { - var gamesResult = await sut.SearchGames("World of Warcraft"); - Assert.NotNull(gamesResult); - Assert.NotEmpty(gamesResult); - } - } -} diff --git a/ExternalAPIs/ExternalAPIs.csproj b/ExternalAPIs/ExternalAPIs.csproj index 412660a..bf278f1 100644 --- a/ExternalAPIs/ExternalAPIs.csproj +++ b/ExternalAPIs/ExternalAPIs.csproj @@ -67,39 +67,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ExternalAPIs/TwitchTv/Helix/Dto/TopGames.cs b/ExternalAPIs/TwitchTv/Helix/Dto/TopGames.cs index b5a50e9..49d6fa3 100644 --- a/ExternalAPIs/TwitchTv/Helix/Dto/TopGames.cs +++ b/ExternalAPIs/TwitchTv/Helix/Dto/TopGames.cs @@ -3,16 +3,16 @@ namespace ExternalAPIs.TwitchTv.Helix.Dto { - public class TopGamesRoot + public class TopCategoriesRoot { [JsonProperty("data")] - public List TopGames { get; set; } + public List TopCategories { get; set; } [JsonProperty("pagination")] public Pagination Pagination { get; set; } } - public class TopGame + public class TwitchCategory { [JsonProperty("id")] public string Id { get; set; } diff --git a/ExternalAPIs/TwitchTv/Helix/ITwitchTvHelixReadonlyClient.cs b/ExternalAPIs/TwitchTv/Helix/ITwitchTvHelixReadonlyClient.cs index ac1a3b4..e413691 100644 --- a/ExternalAPIs/TwitchTv/Helix/ITwitchTvHelixReadonlyClient.cs +++ b/ExternalAPIs/TwitchTv/Helix/ITwitchTvHelixReadonlyClient.cs @@ -12,7 +12,7 @@ public interface ITwitchTvHelixReadonlyClient Task GetStreams(GetStreamsQuery getStreamsQuery, CancellationToken cancellationToken = default); - Task> GetTopGames(CancellationToken cancellationToken = default); + Task> GetTopGames(CancellationToken cancellationToken = default); Task GetUserByUsername(string username, CancellationToken cancellationToken = default); @@ -22,6 +22,8 @@ public interface ITwitchTvHelixReadonlyClient Task> GetGames(GetGamesQuery getGamesQuery, CancellationToken cancellationToken = default); + Task> SearchCategories(string searchCategory, CancellationToken cancellationToken = default); + void SetAccessToken(string accessToken); } } \ No newline at end of file diff --git a/ExternalAPIs/TwitchTv/Helix/RequestConstants.cs b/ExternalAPIs/TwitchTv/Helix/RequestConstants.cs index 14b1421..d45dc87 100644 --- a/ExternalAPIs/TwitchTv/Helix/RequestConstants.cs +++ b/ExternalAPIs/TwitchTv/Helix/RequestConstants.cs @@ -8,6 +8,7 @@ public static class RequestConstants public const string TwitchTvApiRoot = "https://api.twitch.tv/helix"; public const string UserFollows = TwitchTvApiRoot + "/users/follows?from_id={0}"; public const string Streams = TwitchTvApiRoot + "/streams"; + public const string SearchCategories = TwitchTvApiRoot + "/search/categories"; public const string Games = TwitchTvApiRoot + "/games"; public const string Videos = TwitchTvApiRoot + "/videos"; public const string TopGames = TwitchTvApiRoot + "/games/top"; diff --git a/ExternalAPIs/TwitchTv/Helix/TwitchTvHelixHelixReadonlyClient.cs b/ExternalAPIs/TwitchTv/Helix/TwitchTvHelixHelixReadonlyClient.cs index 10cca5e..d05f303 100644 --- a/ExternalAPIs/TwitchTv/Helix/TwitchTvHelixHelixReadonlyClient.cs +++ b/ExternalAPIs/TwitchTv/Helix/TwitchTvHelixHelixReadonlyClient.cs @@ -81,11 +81,11 @@ public async Task GetStreams(GetStreamsQuery getStreamsQuery, Cance return streamsRoot; } - public async Task> GetTopGames(CancellationToken cancellationToken = default) + public async Task> GetTopGames(CancellationToken cancellationToken = default) { var request = RequestConstants.TopGames; - var gamesRoot = await ExecuteRequest(request, cancellationToken); - return gamesRoot.TopGames; + var topCategoriesRoot = await ExecuteRequest(request, cancellationToken); + return topCategoriesRoot.TopCategories; } public async Task GetUserByUsername(string username, CancellationToken cancellationToken = default) @@ -189,6 +189,17 @@ public async Task GetVideos(GetVideosQuery getVideosQuery, Cancellat return channelVideosRoot; } + public async Task> SearchCategories(string searchCategory, CancellationToken cancellationToken = default) + { + if (string.IsNullOrEmpty(searchCategory)) + throw new ArgumentException("Value cannot be null or empty.", nameof(searchCategory)); + + var request = RequestConstants.SearchCategories + "?query=" + searchCategory; + + var topCategoriesRoot = await ExecuteRequest(request, cancellationToken); + return topCategoriesRoot.TopCategories; + } + public void SetAccessToken(string accessToken) { _accessToken = accessToken; diff --git a/ExternalAPIs/TwitchTv/V3/Converters/SingleOrArrayConverter.cs b/ExternalAPIs/TwitchTv/V3/Converters/SingleOrArrayConverter.cs deleted file mode 100644 index 3a1ac39..0000000 --- a/ExternalAPIs/TwitchTv/V3/Converters/SingleOrArrayConverter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace ExternalAPIs.TwitchTv.V3.Converters -{ - // Credits to http://stackoverflow.com/a/18997172/2631967 - /// Handles json properties that both return a single result or an array of a results for the same property - public class SingleOrArrayConverter : JsonConverter - { - public override bool CanConvert(Type objectType) - { - return (objectType == typeof(List)); - } - - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - JToken token = JToken.Load(reader); - if (token.Type == JTokenType.Array) - { - return token.ToObject>(); - } - return new List { token.ToObject() }; - } - - public override bool CanWrite => false; - - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/ExternalAPIs/TwitchTv/V3/Converters/SingleOrArrayThumbnailConverter.cs b/ExternalAPIs/TwitchTv/V3/Converters/SingleOrArrayThumbnailConverter.cs deleted file mode 100644 index cdc1d00..0000000 --- a/ExternalAPIs/TwitchTv/V3/Converters/SingleOrArrayThumbnailConverter.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using ExternalAPIs.TwitchTv.V3.Dto; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace ExternalAPIs.TwitchTv.V3.Converters -{ - /// - /// Special case converter since sometimes thumbnails are returned as just the string url of the thumbnail - /// - public class SingleOrArrayThumbnailConverter : SingleOrArrayConverter - { - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - JToken token = JToken.Load(reader); - if (token.Type == JTokenType.String) - { - return new List() { new Thumbnail() { Url = token.ToObject() } }; - } - if (token.Type == JTokenType.Array) - { - return token.ToObject>(); - } - return new List { token.ToObject() }; - } - } -} \ No newline at end of file diff --git a/ExternalAPIs/TwitchTv/V3/Dto/Channel.cs b/ExternalAPIs/TwitchTv/V3/Dto/Channel.cs deleted file mode 100644 index 5dafd9a..0000000 --- a/ExternalAPIs/TwitchTv/V3/Dto/Channel.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Newtonsoft.Json; - -namespace ExternalAPIs.TwitchTv.V3.Dto -{ - public class Channel - { - [JsonProperty("_links")] - public ChannelLinks ChannelLinks { get; set; } - - public object Background { get; set; } - - public object Banner { get; set; } - - [JsonProperty("broadcaster_language")] - public string BroadcasterLanguage { get; set; } - - [JsonProperty("display_name")] - public string DisplayName { get; set; } - - public string Game { get; set; } - - public string Logo { get; set; } - - public bool? Mature { get; set; } - - public string Status { get; set; } - - public bool? Partner { get; set; } - - public string Url { get; set; } - - [JsonProperty("video_banner")] - public string VideoBanner { get; set; } - - [JsonProperty("_id")] - public int? Id { get; set; } - - public string Name { get; set; } - - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - - [JsonProperty("updated_at")] - public string UpdatedAt { get; set; } - - public int? Delay { get; set; } - - public int? Followers { get; set; } - - [JsonProperty("profile_banner")] - public string ProfileBanner { get; set; } - - [JsonProperty("profile_banner_background_color")] - public string ProfileBannerBackgroundColor { get; set; } - - public int? Views { get; set; } - - public string Language { get; set; } - } -} \ No newline at end of file diff --git a/ExternalAPIs/TwitchTv/V3/Dto/ChannelLinks.cs b/ExternalAPIs/TwitchTv/V3/Dto/ChannelLinks.cs deleted file mode 100644 index 1a0f93b..0000000 --- a/ExternalAPIs/TwitchTv/V3/Dto/ChannelLinks.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Newtonsoft.Json; - -namespace ExternalAPIs.TwitchTv.V3.Dto -{ - public class ChannelLinks - { - public string Self { get; set; } - - public string Follows { get; set; } - - public string Commercial { get; set; } - - [JsonProperty("stream_key")] - public string StreamKey { get; set; } - - public string Chat { get; set; } - - public string Features { get; set; } - - public string Subscriptions { get; set; } - - public string Editors { get; set; } - - public string Videos { get; set; } - - public string Teams { get; set; } - } -} \ No newline at end of file diff --git a/ExternalAPIs/TwitchTv/V3/Dto/Follow.cs b/ExternalAPIs/TwitchTv/V3/Dto/Follow.cs deleted file mode 100644 index a4969c7..0000000 --- a/ExternalAPIs/TwitchTv/V3/Dto/Follow.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace ExternalAPIs.TwitchTv.V3.Dto -{ - public class Follow - { - public string CreatedAt { get; set; } - - public bool? Notifications { get; set; } - - public Channel Channel { get; set; } - } -} \ No newline at end of file diff --git a/ExternalAPIs/TwitchTv/V3/Dto/Fps.cs b/ExternalAPIs/TwitchTv/V3/Dto/Fps.cs deleted file mode 100644 index 06fdb90..0000000 --- a/ExternalAPIs/TwitchTv/V3/Dto/Fps.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Newtonsoft.Json; - -namespace ExternalAPIs.TwitchTv.V3.Dto -{ - public class Fps - { - [JsonProperty("audio_only")] - public double AudioOnly { get; set; } - - public double Medium { get; set; } - - public double Mobile { get; set; } - - public double High { get; set; } - - public double Low { get; set; } - - public double Chunked { get; set; } - } -} \ No newline at end of file diff --git a/ExternalAPIs/TwitchTv/V3/Dto/Game.cs b/ExternalAPIs/TwitchTv/V3/Dto/Game.cs deleted file mode 100644 index bba0ec6..0000000 --- a/ExternalAPIs/TwitchTv/V3/Dto/Game.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Newtonsoft.Json; - -namespace ExternalAPIs.TwitchTv.V3.Dto -{ - public class Game - { - public string Name { get; set; } - - [JsonProperty("_id")] - public int Id { get; set; } - - public PreviewImage Box { get; set; } - - public PreviewImage Logo { get; set; } - } -} diff --git a/ExternalAPIs/TwitchTv/V3/Dto/PreviewImage.cs b/ExternalAPIs/TwitchTv/V3/Dto/PreviewImage.cs deleted file mode 100644 index cdda8b8..0000000 --- a/ExternalAPIs/TwitchTv/V3/Dto/PreviewImage.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace ExternalAPIs.TwitchTv.V3.Dto -{ - public class PreviewImage - { - public string Small { get; set; } - - public string Medium { get; set; } - - public string Large { get; set; } - - public string Template { get; set; } - } -} \ No newline at end of file diff --git a/ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/ChannelVideosRoot.cs b/ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/ChannelVideosRoot.cs deleted file mode 100644 index e5ed732..0000000 --- a/ExternalAPIs/TwitchTv/V3/Dto/QueryRoot/ChannelVideosRoot.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace ExternalAPIs.TwitchTv.V3.Dto.QueryRoot -{ - public class ChannelVideosRoot - { - [JsonProperty(PropertyName = "_total", NullValueHandling = NullValueHandling.Ignore)] - public int Total { get; set; } - - public List