2020-01-06 00:21:05 +00:00
|
|
|
|
using System;
|
2020-04-23 10:38:43 +00:00
|
|
|
|
using System.Linq;
|
2021-06-14 03:31:09 +00:00
|
|
|
|
using System.Threading;
|
2020-04-23 10:38:43 +00:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using HtmlAgilityPack;
|
2021-06-14 03:31:09 +00:00
|
|
|
|
using Wabbajack.Common;
|
2020-04-06 20:48:54 +00:00
|
|
|
|
using Wabbajack.Common.Serialization.Json;
|
2021-06-14 03:31:09 +00:00
|
|
|
|
using Wabbajack.Lib.Validation;
|
2020-01-06 00:21:05 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack.Lib.Downloaders
|
|
|
|
|
{
|
2021-06-15 04:55:07 +00:00
|
|
|
|
public class VectorPlexusOAuthDownloader : AbstractIPS4OAuthDownloader<VectorPlexusOAuthDownloader, VectorPlexusOAuthDownloader.State>
|
2020-01-06 00:21:05 +00:00
|
|
|
|
{
|
|
|
|
|
#region INeedsDownload
|
|
|
|
|
public override string SiteName => "Vector Plexus";
|
|
|
|
|
public override Uri SiteURL => new Uri("https://vectorplexus.com");
|
|
|
|
|
public override Uri IconUri => new Uri("https://www.vectorplexus.com/favicon.ico");
|
|
|
|
|
#endregion
|
|
|
|
|
|
2021-06-15 04:55:07 +00:00
|
|
|
|
public VectorPlexusOAuthDownloader() : base("45c6d3c9867903a7daa6ded0a38cedf8",
|
|
|
|
|
new Uri("https://vectorplexus.com/oauth/authorize/"),
|
|
|
|
|
new Uri("https://vectorplexus.com/oauth/token/"),
|
|
|
|
|
new []{"profile", "get_downloads"},
|
2021-06-14 03:31:09 +00:00
|
|
|
|
"vector-plexus-oauth2")
|
2020-01-06 00:21:05 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2021-06-14 03:31:09 +00:00
|
|
|
|
|
|
|
|
|
|
2021-06-15 04:55:07 +00:00
|
|
|
|
[JsonName("VectorPlexusOAuthDownloader+State")]
|
|
|
|
|
public class State : AbstractIPS4OAuthDownloader<VectorPlexusOAuthDownloader, VectorPlexusOAuthDownloader.State>.State
|
2021-06-14 03:31:09 +00:00
|
|
|
|
{
|
|
|
|
|
public override IDownloader GetDownloader()
|
|
|
|
|
{
|
2021-06-15 04:55:07 +00:00
|
|
|
|
return DownloadDispatcher.GetInstance<VectorPlexusOAuthDownloader>();
|
2020-04-23 10:38:43 +00:00
|
|
|
|
}
|
2020-01-06 00:21:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|