using System.Threading.Tasks; using StardewModdingAPI.Toolkit.Framework.Clients.Wiki; namespace StardewModdingAPI.Toolkit { /// A convenience wrapper for the various tools. public class ModToolkit { /********* ** Properties *********/ /// The default HTTP user agent for the toolkit. private readonly string UserAgent; /********* ** Public methods *********/ /// Construct an instance. public ModToolkit() { ISemanticVersion version = new SemanticVersion(this.GetType().Assembly.GetName().Version); this.UserAgent = $"SMAPI Mod Handler Toolkit/{version}"; } /// Extract mod metadata from the wiki compatibility list. public async Task GetWikiCompatibilityListAsync() { var client = new WikiCompatibilityClient(this.UserAgent); return await client.FetchAsync(); } } }