refactor: deprecate XivApi class

This commit is contained in:
goat 2021-01-18 01:12:26 +01:00
parent 05f8adfaf9
commit 9fd0272d3d

View file

@ -18,6 +18,7 @@ namespace Dalamud
private static readonly ConcurrentDictionary<string, JObject> cachedResponses = new ConcurrentDictionary<string, JObject>();
[Obsolete("This class will not be supported anymore in the future. Please migrate to your own version.", true)]
public static async Task<JObject> 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<JObject> 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<JObject> 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<JObject> 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<JObject> 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<JObject> 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<JObject> 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<JObject> 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<JObject> 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<dynamic> Get(string endpoint, bool noCache = false)
{
Log.Verbose("XIVAPI FETCH: {0}", endpoint);