mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-23 16:27:44 +01:00
Fix for #22 - prepending an item name with a '+' will do an exact search
This commit is contained in:
parent
083d3a8ecb
commit
75d0fda4ed
2 changed files with 17 additions and 4 deletions
|
|
@ -49,10 +49,16 @@ namespace Dalamud
|
|||
return await Get("ContentFinderCondition/" + contentFinderCondition);
|
||||
}
|
||||
|
||||
public static async Task<JObject> Search(string query, string indexes, int limit = 100) {
|
||||
public static async Task<JObject> Search(string query, string indexes, int limit = 100, bool exact = false) {
|
||||
query = System.Net.WebUtility.UrlEncode(query);
|
||||
|
||||
return await Get("search" + $"?string={query}&indexes={indexes}&limit={limit}");
|
||||
var queryString = $"?string={query}&indexes={indexes}&limit={limit}";
|
||||
if (exact)
|
||||
{
|
||||
queryString += "&string_algo=match";
|
||||
}
|
||||
|
||||
return await Get("search" + queryString);
|
||||
}
|
||||
|
||||
public static async Task<JObject> GetMarketInfoWorld(int itemId, string worldName) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue