summaryrefslogtreecommitdiff
path: root/src/SMAPI.Internal
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-06-02 18:22:04 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-06-02 18:22:04 -0400
commitde74b038e4c15d393de8828c89814ef7eaefe507 (patch)
tree811f095ed6d95a0d08da8511b6ccc0b5e9dc7825 /src/SMAPI.Internal
parentb6cda8f0d32898f34b5c7dc703a85aa823c317ce (diff)
downloadSMAPI-de74b038e4c15d393de8828c89814ef7eaefe507.tar.gz
SMAPI-de74b038e4c15d393de8828c89814ef7eaefe507.tar.bz2
SMAPI-de74b038e4c15d393de8828c89814ef7eaefe507.zip
move web API client into toolkit (#532)
Diffstat (limited to 'src/SMAPI.Internal')
-rw-r--r--src/SMAPI.Internal/Models/ModInfoModel.cs56
-rw-r--r--src/SMAPI.Internal/Models/ModSeachModel.cs37
-rw-r--r--src/SMAPI.Internal/SMAPI.Internal.projitems2
3 files changed, 0 insertions, 95 deletions
diff --git a/src/SMAPI.Internal/Models/ModInfoModel.cs b/src/SMAPI.Internal/Models/ModInfoModel.cs
deleted file mode 100644
index 725c88bb..00000000
--- a/src/SMAPI.Internal/Models/ModInfoModel.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-namespace StardewModdingAPI.Internal.Models
-{
- /// <summary>Generic metadata about a mod.</summary>
- internal class ModInfoModel
- {
- /*********
- ** Accessors
- *********/
- /// <summary>The mod name.</summary>
- public string Name { get; set; }
-
- /// <summary>The semantic version for the mod's latest release.</summary>
- public string Version { get; set; }
-
- /// <summary>The semantic version for the mod's latest preview release, if available and different from <see cref="Version"/>.</summary>
- public string PreviewVersion { get; set; }
-
- /// <summary>The mod's web URL.</summary>
- public string Url { get; set; }
-
- /// <summary>The error message indicating why the mod is invalid (if applicable).</summary>
- public string Error { get; set; }
-
-
- /*********
- ** Public methods
- *********/
- /// <summary>Construct an empty instance.</summary>
- public ModInfoModel()
- {
- // needed for JSON deserialising
- }
-
- /// <summary>Construct an instance.</summary>
- /// <param name="name">The mod name.</param>
- /// <param name="version">The semantic version for the mod's latest release.</param>
- /// <param name="previewVersion">The semantic version for the mod's latest preview release, if available and different from <see cref="Version"/>.</param>
- /// <param name="url">The mod's web URL.</param>
- /// <param name="error">The error message indicating why the mod is invalid (if applicable).</param>
- public ModInfoModel(string name, string version, string url, string previewVersion = null, string error = null)
- {
- this.Name = name;
- this.Version = version;
- this.PreviewVersion = previewVersion;
- this.Url = url;
- this.Error = error; // mainly initialised here for the JSON deserialiser
- }
-
- /// <summary>Construct an instance.</summary>
- /// <param name="error">The error message indicating why the mod is invalid.</param>
- public ModInfoModel(string error)
- {
- this.Error = error;
- }
- }
-}
diff --git a/src/SMAPI.Internal/Models/ModSeachModel.cs b/src/SMAPI.Internal/Models/ModSeachModel.cs
deleted file mode 100644
index fac72135..00000000
--- a/src/SMAPI.Internal/Models/ModSeachModel.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace StardewModdingAPI.Internal.Models
-{
- /// <summary>Specifies mods whose update-check info to fetch.</summary>
- internal class ModSearchModel
- {
- /*********
- ** Accessors
- *********/
- /// <summary>The namespaced mod keys to search.</summary>
- public string[] ModKeys { get; set; }
-
- /// <summary>Whether to allow non-semantic versions, instead of returning an error for those.</summary>
- public bool AllowInvalidVersions { get; set; }
-
-
- /*********
- ** Public methods
- *********/
- /// <summary>Construct an empty instance.</summary>
- public ModSearchModel()
- {
- // needed for JSON deserialising
- }
-
- /// <summary>Construct an instance.</summary>
- /// <param name="modKeys">The namespaced mod keys to search.</param>
- /// <param name="allowInvalidVersions">Whether to allow non-semantic versions, instead of returning an error for those.</param>
- public ModSearchModel(IEnumerable<string> modKeys, bool allowInvalidVersions)
- {
- this.ModKeys = modKeys.ToArray();
- this.AllowInvalidVersions = allowInvalidVersions;
- }
- }
-}
diff --git a/src/SMAPI.Internal/SMAPI.Internal.projitems b/src/SMAPI.Internal/SMAPI.Internal.projitems
index 33b8cbfa..54b12003 100644
--- a/src/SMAPI.Internal/SMAPI.Internal.projitems
+++ b/src/SMAPI.Internal/SMAPI.Internal.projitems
@@ -12,8 +12,6 @@
<Compile Include="$(MSBuildThisFileDirectory)ConsoleWriting\ColorfulConsoleWriter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)EnvironmentUtility.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ConsoleWriting\LogLevel.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)Models\ModInfoModel.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)Models\ModSeachModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ConsoleWriting\MonitorColorScheme.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Platform.cs" />
</ItemGroup>