benjaminkomen / TibiaWikiApi

Expose data from TibiaWiki with a REST API
MIT License
35 stars 2 forks source link

searchable? #57

Open gpedro opened 4 years ago

gpedro commented 4 years ago

if I want to search an item when it contains "sword" keyword, this API has a search method or something related?

benjaminkomen commented 4 years ago

No, it doesn't. I could add such a feature. Would you want to search through only the item names, or also other item properties, like the notes of an item? In the latter case, you would of course also find items which only mention "sword" in the notes, but are not actually a sword.

gpedro commented 4 years ago

currently, I use the TibiaWikiSQL to generate a JSON to make a client-searchable tool to search by itemid (clientid) and name. but every time I need to generate this JSON file; Check my tool: https://gpedro.github.io/tibia-clientid-finder/ (i will release open-source soon)

I have a project focused on developing an open tibia server: https://github.com/opentibiabr/otservbr-global

That's the reason why I need this tool. Because when we get a raw byte to implement some feature, I need to check if raw bytes matches with some itemid to predict the packet structure.

benjaminkomen commented 4 years ago

Ok, thx for explaining the reason why you need this, but I'm still not really sure if you want to:

Maybe you could add an example, i.e. "when I search through items for 'sword' I expect the following 3 items to be found."

gpedro commented 4 years ago

search by item id and item name into all elements of the game (items, creatures, stones, walls, ...)