From 9fd0272d3dfc007199c83013f4cc59eb519ffcfd Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Mon, 18 Jan 2021 01:12:26 +0100 Subject: [PATCH] refactor: deprecate XivApi class --- Dalamud/XivApi.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dalamud/XivApi.cs b/Dalamud/XivApi.cs index babe98039..31b6f334b 100644 --- a/Dalamud/XivApi.cs +++ b/Dalamud/XivApi.cs @@ -18,6 +18,7 @@ namespace Dalamud private static readonly ConcurrentDictionary cachedResponses = new ConcurrentDictionary(); + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task GetWorld(int world) { var res = await Get("World/" + world); @@ -25,6 +26,7 @@ namespace Dalamud return res; } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task GetClassJob(int id) { var res = await Get("ClassJob/" + id); @@ -32,6 +34,7 @@ namespace Dalamud return res; } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task GetFate(int id) { var res = await Get("Fate/" + id); @@ -39,6 +42,7 @@ namespace Dalamud return res; } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task GetCharacterSearch(string name, string world) { var res = await Get("character/search" + $"?name={name}&server={world}"); @@ -46,10 +50,12 @@ namespace Dalamud return res; } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task GetContentFinderCondition(int contentFinderCondition) { return await Get("ContentFinderCondition/" + contentFinderCondition); } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task Search(string query, string indexes, int limit = 100, bool exact = false) { query = System.Net.WebUtility.UrlEncode(query); @@ -62,18 +68,22 @@ namespace Dalamud return await Get("search" + queryString); } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task GetMarketInfoWorld(int itemId, string worldName) { return await Get($"market/{worldName}/item/{itemId}", true); } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task GetMarketInfoDc(int itemId, string dcName) { return await Get($"market/item/{itemId}?dc={dcName}", true); } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task GetItem(uint itemId) { return await Get($"Item/{itemId}", true); } + [Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)] public static async Task Get(string endpoint, bool noCache = false) { Log.Verbose("XIVAPI FETCH: {0}", endpoint);