diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-26 00:31:36 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-26 00:31:36 -0500 |
commit | 15d4b6310e3dd15c62f3faedbf1290b2db26fb59 (patch) | |
tree | 47d49a9c69628f0df1e688361f46bc5b46b3c0fd /src/SMAPI.Web/Framework/ConfigModels | |
parent | 5cc5f089b9645a60385ff293b5a7202f260bfc0f (diff) | |
parent | f19cc3aac1a781bf2f2d20bc9577c2fe929b1e96 (diff) | |
download | SMAPI-15d4b6310e3dd15c62f3faedbf1290b2db26fb59.tar.gz SMAPI-15d4b6310e3dd15c62f3faedbf1290b2db26fb59.tar.bz2 SMAPI-15d4b6310e3dd15c62f3faedbf1290b2db26fb59.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/Framework/ConfigModels')
4 files changed, 87 insertions, 73 deletions
diff --git a/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs new file mode 100644 index 00000000..61219414 --- /dev/null +++ b/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs @@ -0,0 +1,72 @@ +namespace StardewModdingAPI.Web.Framework.ConfigModels +{ + /// <summary>The config settings for the API clients.</summary> + internal class ApiClientsConfig + { + /********* + ** Accessors + *********/ + /**** + ** Generic + ****/ + /// <summary>The user agent for API clients, where {0} is the SMAPI version.</summary> + public string UserAgent { get; set; } + + + /**** + ** Chucklefish + ****/ + /// <summary>The base URL for the Chucklefish mod site.</summary> + public string ChucklefishBaseUrl { get; set; } + + /// <summary>The URL for a mod page on the Chucklefish mod site excluding the <see cref="GitHubBaseUrl"/>, where {0} is the mod ID.</summary> + public string ChucklefishModPageUrlFormat { get; set; } + + + /**** + ** GitHub + ****/ + /// <summary>The base URL for the GitHub API.</summary> + public string GitHubBaseUrl { get; set; } + + /// <summary>The URL for a GitHub API latest-release query excluding the <see cref="GitHubBaseUrl"/>, where {0} is the organisation and project name.</summary> + public string GitHubReleaseUrlFormat { get; set; } + + /// <summary>The Accept header value expected by the GitHub API.</summary> + public string GitHubAcceptHeader { get; set; } + + /// <summary>The username with which to authenticate to the GitHub API (if any).</summary> + public string GitHubUsername { get; set; } + + /// <summary>The password with which to authenticate to the GitHub API (if any).</summary> + public string GitHubPassword { get; set; } + + /**** + ** Nexus Mods + ****/ + /// <summary>The user agent for the Nexus Mods API client.</summary> + public string NexusUserAgent { get; set; } + + /// <summary>The base URL for the Nexus Mods API.</summary> + public string NexusBaseUrl { get; set; } + + /// <summary>The URL for a Nexus Mods API query excluding the <see cref="NexusBaseUrl"/>, where {0} is the mod ID.</summary> + public string NexusModUrlFormat { get; set; } + + /**** + ** Pastebin + ****/ + /// <summary>The base URL for the Pastebin API.</summary> + public string PastebinBaseUrl { get; set; } + + /// <summary>The user agent for the Pastebin API client, where {0} is the SMAPI version.</summary> + public string PastebinUserAgent { get; set; } + + /// <summary>The user key used to authenticate with the Pastebin API.</summary> + public string PastebinUserKey { get; set; } + + /// <summary>The developer key used to authenticate with the Pastebin API.</summary> + public string PastebinDevKey { get; set; } + + } +} diff --git a/src/SMAPI.Web/Framework/ConfigModels/ContextConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ContextConfig.cs new file mode 100644 index 00000000..117462f4 --- /dev/null +++ b/src/SMAPI.Web/Framework/ConfigModels/ContextConfig.cs @@ -0,0 +1,15 @@ +namespace StardewModdingAPI.Web.Framework.ConfigModels +{ + /// <summary>The config settings for the app context.</summary> + public class ContextConfig // must be public to pass into views + { + /********* + ** Accessors + *********/ + /// <summary>The root URL for the app.</summary> + public string RootUrl { get; set; } + + /// <summary>The root URL for the log parser.</summary> + public string LogParserUrl { get; set; } + } +} diff --git a/src/SMAPI.Web/Framework/ConfigModels/LogParserConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/LogParserConfig.cs deleted file mode 100644 index df5d605d..00000000 --- a/src/SMAPI.Web/Framework/ConfigModels/LogParserConfig.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace StardewModdingAPI.Web.Framework.ConfigModels -{ - /// <summary>The config settings for the log parser.</summary> - internal class LogParserConfig - { - /********* - ** Accessors - *********/ - /// <summary>The root URL for the log parser controller.</summary> - public string SectionUrl { get; set; } - - /// <summary>The base URL for the Pastebin API.</summary> - public string PastebinBaseUrl { get; set; } - - /// <summary>The user agent for the Pastebin API client, where {0} is the SMAPI version.</summary> - public string PastebinUserAgent { get; set; } - - /// <summary>The user key used to authenticate with the Pastebin API.</summary> - public string PastebinUserKey { get; set; } - - /// <summary>The developer key used to authenticate with the Pastebin API.</summary> - public string PastebinDevKey { get; set; } - } -} diff --git a/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs index 2fb5b97e..58c3a100 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs @@ -6,9 +6,6 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /********* ** Accessors *********/ - /**** - ** General - ****/ /// <summary>The number of minutes update checks should be cached before refetching them.</summary> public int CacheMinutes { get; set; } @@ -16,59 +13,13 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /// <remarks>Derived from SMAPI's SemanticVersion implementation.</remarks> public string SemanticVersionRegex { get; set; } - /**** - ** Chucklefish mod site - ****/ /// <summary>The repository key for the Chucklefish mod site.</summary> public string ChucklefishKey { get; set; } - /// <summary>The user agent for the Chucklefish API client, where {0} is the SMAPI version.</summary> - public string ChucklefishUserAgent { get; set; } - - /// <summary>The base URL for the Chucklefish mod site.</summary> - public string ChucklefishBaseUrl { get; set; } - - /// <summary>The URL for a mod page on the Chucklefish mod site excluding the <see cref="GitHubBaseUrl"/>, where {0} is the mod ID.</summary> - public string ChucklefishModPageUrlFormat { get; set; } - - - /**** - ** GitHub - ****/ /// <summary>The repository key for Nexus Mods.</summary> public string GitHubKey { get; set; } - /// <summary>The user agent for the GitHub API client, where {0} is the SMAPI version.</summary> - public string GitHubUserAgent { get; set; } - - /// <summary>The base URL for the GitHub API.</summary> - public string GitHubBaseUrl { get; set; } - - /// <summary>The URL for a GitHub API latest-release query excluding the <see cref="GitHubBaseUrl"/>, where {0} is the organisation and project name.</summary> - public string GitHubReleaseUrlFormat { get; set; } - - /// <summary>The Accept header value expected by the GitHub API.</summary> - public string GitHubAcceptHeader { get; set; } - - /// <summary>The username with which to authenticate to the GitHub API (if any).</summary> - public string GitHubUsername { get; set; } - - /// <summary>The password with which to authenticate to the GitHub API (if any).</summary> - public string GitHubPassword { get; set; } - - /**** - ** Nexus Mods - ****/ /// <summary>The repository key for Nexus Mods.</summary> public string NexusKey { get; set; } - - /// <summary>The user agent for the Nexus Mods API client.</summary> - public string NexusUserAgent { get; set; } - - /// <summary>The base URL for the Nexus Mods API.</summary> - public string NexusBaseUrl { get; set; } - - /// <summary>The URL for a Nexus Mods API query excluding the <see cref="NexusBaseUrl"/>, where {0} is the mod ID.</summary> - public string NexusModUrlFormat { get; set; } } } |