diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-24 23:40:23 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-24 23:40:23 -0500 |
commit | bbd021f8736d1496f34a58b12bb0ee6c341d1c5e (patch) | |
tree | bd31841d13f8ada582fd6aaf0f97f918449c719a /src/SMAPI.Web/Startup.cs | |
parent | 05541c11a72735d79d98cf3ae14d592e70bd8f54 (diff) | |
download | SMAPI-bbd021f8736d1496f34a58b12bb0ee6c341d1c5e.tar.gz SMAPI-bbd021f8736d1496f34a58b12bb0ee6c341d1c5e.tar.bz2 SMAPI-bbd021f8736d1496f34a58b12bb0ee6c341d1c5e.zip |
decouple Pastebin client from log parser (#411)
Diffstat (limited to 'src/SMAPI.Web/Startup.cs')
-rw-r--r-- | src/SMAPI.Web/Startup.cs | 10 |
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 + )); } } |