summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Startup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Startup.cs')
-rw-r--r--src/SMAPI.Web/Startup.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Startup.cs b/src/SMAPI.Web/Startup.cs
index 7938520a..307c4ae9 100644
--- a/src/SMAPI.Web/Startup.cs
+++ b/src/SMAPI.Web/Startup.cs
@@ -10,6 +10,7 @@ using StardewModdingAPI.Web.Framework;
using StardewModdingAPI.Web.Framework.Clients.Chucklefish;
using StardewModdingAPI.Web.Framework.Clients.GitHub;
using StardewModdingAPI.Web.Framework.Clients.Nexus;
+using StardewModdingAPI.Web.Framework.Clients.Pastebin;
using StardewModdingAPI.Web.Framework.ConfigModels;
using StardewModdingAPI.Web.Framework.RewriteRules;
@@ -69,6 +70,7 @@ namespace StardewModdingAPI.Web
baseUrl: api.ChucklefishBaseUrl,
modPageUrlFormat: api.ChucklefishModPageUrlFormat
));
+
services.AddSingleton<IGitHubClient>(new GitHubClient(
baseUrl: api.GitHubBaseUrl,
releaseUrlFormat: api.GitHubReleaseUrlFormat,
@@ -77,11 +79,19 @@ namespace StardewModdingAPI.Web
username: api.GitHubUsername,
password: api.GitHubPassword
));
+
services.AddSingleton<INexusClient>(new NexusClient(
userAgent: api.NexusUserAgent,
baseUrl: api.NexusBaseUrl,
modUrlFormat: api.NexusModUrlFormat
));
+
+ services.AddSingleton<IPastebinClient>(new PastebinClient(
+ baseUrl: api.PastebinBaseUrl,
+ userAgent: userAgent,
+ userKey: api.PastebinUserKey,
+ devKey: api.PastebinDevKey
+ ));
}
}