twitch clips support added

This commit is contained in:
2024-03-03 03:14:07 +01:00
Unverified
parent 1a57a039aa
commit 2d666ede27
46 changed files with 639 additions and 46 deletions

View File

@@ -0,0 +1,15 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Request
{
public class GetClipTokenExtensions
{
[JsonProperty("persistedQuery")]
public GetClipTokenPersistedQuery PersistedQuery { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Request
{
public class GetClipTokenPersistedQuery
{
[JsonProperty("version")]
public int Version { get; set; }
[JsonProperty("sha256Hash")]
public string Sha256Hash { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Request
{
public class GetClipTokenRequest
{
[JsonProperty("operationName")]
public string OperationName { get; set; }
[JsonProperty("variables")]
public GetClipTokenVariables Variables { get; set; }
[JsonProperty("extensions")]
public GetClipTokenExtensions Extensions { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Request
{
public class GetClipTokenVariables
{
[JsonProperty("slug")]
public string Slug { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Response
{
public class GetClipTokenClip
{
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("playbackAccessToken")]
public GetClipTokenPlaybackAccessToken PlaybackAccessToken { get; set; }
[JsonProperty("videoQualities")]
public List<GetClipTokenVideoQuality> VideoQualities { get; set; }
[JsonProperty("__typename")]
public string Typename { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VDownload.Sources.Twitch.Configuration.Models;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Response
{
public class GetClipTokenData
{
[JsonProperty("clip")]
public GetClipTokenClip Clip { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Response
{
public class GetClipTokenExtensions
{
[JsonProperty("durationMilliseconds")]
public int DurationMilliseconds { get; set; }
[JsonProperty("operationName")]
public string OperationName { get; set; }
[JsonProperty("requestID")]
public string RequestID { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Response
{
public class GetClipTokenPlaybackAccessToken
{
[JsonProperty("signature")]
public string Signature { get; set; }
[JsonProperty("value")]
public string Value { get; set; }
[JsonProperty("__typename")]
public string Typename { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VDownload.Sources.Twitch.Api.GQL.GetClipToken.Request;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Response
{
public class GetClipTokenResponse
{
[JsonProperty("data")]
public GetClipTokenData Data { get; set; }
[JsonProperty("extensions")]
public Response.GetClipTokenExtensions Extensions { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Sources.Twitch.Api.GQL.GetClipToken.Response
{
public class GetClipTokenVideoQuality
{
[JsonProperty("frameRate")]
public double FrameRate { get; set; }
[JsonProperty("quality")]
public string Quality { get; set; }
[JsonProperty("sourceURL")]
public string SourceURL { get; set; }
[JsonProperty("__typename")]
public string Typename { get; set; }
}
}