summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Caching/Wiki/IWikiCacheRepository.cs
blob: 2ab7ea5afb5572c32cff645582842dee183696d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using StardewModdingAPI.Toolkit.Framework.Clients.Wiki;

namespace StardewModdingAPI.Web.Framework.Caching.Wiki
{
    /// <summary>Manages cached wiki data.</summary>
    internal interface IWikiCacheRepository : ICacheRepository
    {
        /*********
        ** Methods
        *********/
        /// <summary>Get the cached wiki metadata.</summary>
        /// <param name="metadata">The fetched metadata.</param>
        bool TryGetWikiMetadata(out Cached<WikiMetadata> metadata);

        /// <summary>Get the cached wiki mods.</summary>
        /// <param name="filter">A filter to apply, if any.</param>
        IEnumerable<Cached<WikiModEntry>> GetWikiMods(Func<WikiModEntry, bool> filter = null);

        /// <summary>Save data fetched from the wiki compatibility list.</summary>
        /// <param name="stableVersion">The current stable Stardew Valley version.</param>
        /// <param name="betaVersion">The current beta Stardew Valley version.</param>
        /// <param name="mods">The mod data.</param>
        void SaveWikiData(string stableVersion, string betaVersion, IEnumerable<WikiModEntry> mods);
    }
}