mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
refactor: deprecate XivApi class
This commit is contained in:
parent
05f8adfaf9
commit
9fd0272d3d
1 changed files with 10 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue