From 7ccee33dd6079397b2d48334a263568f2946dccb Mon Sep 17 00:00:00 2001 From: Andrey Kornev Date: Sat, 20 Nov 2021 17:10:40 +0300 Subject: [PATCH] support for custom SteamWebApiBaseUrl (#122) --- src/SteamWebAPI2/Utilities/SteamWebInterfaceFactory.cs | 5 +++++ .../Utilities/SteamWebInterfaceFactoryOptions.cs | 1 + 2 files changed, 6 insertions(+) diff --git a/src/SteamWebAPI2/Utilities/SteamWebInterfaceFactory.cs b/src/SteamWebAPI2/Utilities/SteamWebInterfaceFactory.cs index cc61068..a3c1c1e 100644 --- a/src/SteamWebAPI2/Utilities/SteamWebInterfaceFactory.cs +++ b/src/SteamWebAPI2/Utilities/SteamWebInterfaceFactory.cs @@ -44,6 +44,11 @@ public SteamWebInterfaceFactory(IOptions option this.steamWebApiKey = options.Value.SteamWebApiKey; + if (!string.IsNullOrWhiteSpace(options.Value.SteamWebApiBaseUrl)) + { + this.steamWebApiBaseUrl = options.Value.SteamWebApiBaseUrl; + } + var mapperConfig = new MapperConfiguration(config => { config.AddProfile(); diff --git a/src/SteamWebAPI2/Utilities/SteamWebInterfaceFactoryOptions.cs b/src/SteamWebAPI2/Utilities/SteamWebInterfaceFactoryOptions.cs index 9c440ff..c11605b 100644 --- a/src/SteamWebAPI2/Utilities/SteamWebInterfaceFactoryOptions.cs +++ b/src/SteamWebAPI2/Utilities/SteamWebInterfaceFactoryOptions.cs @@ -3,5 +3,6 @@ namespace SteamWebAPI2.Utilities public class SteamWebInterfaceFactoryOptions { public string SteamWebApiKey { get; set; } + public string SteamWebApiBaseUrl { get; set; } } } \ No newline at end of file