Thread Tools Display Modes
01/10/15, 10:08 AM   #1
Sonar
Join Date: May 2014
Posts: 9
How do I get the item link for an item if I know its name and quality?

Hi, I have the name and quality of an item and I need to obtain the link for that item. Is there an API call for that? Thank you.
  Reply With Quote
01/10/15, 11:03 AM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
No, your UI need to "see" it. Bag, Drop, Quest, In Chat, Bank, or anything else.

There's a lot of parameters needed after itemID to build the real item.
But what's your real need?
  Reply With Quote
01/10/15, 08:06 PM   #3
Sonar
Join Date: May 2014
Posts: 9
Originally Posted by Ayantir View Post
No, your UI need to "see" it. Bag, Drop, Quest, In Chat, Bank, or anything else.

There's a lot of parameters needed after itemID to build the real item.
But what's your real need?
Well I'm trying to use ExecuteTradingHouseSearch to get a list of items in guild stores, but it returns only names and I need their itemIds/links.
  Reply With Quote
01/10/15, 09:55 PM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Sonar View Post
Well I'm trying to use ExecuteTradingHouseSearch to get a list of items in guild stores, but it returns only names and I need their itemIds/links.
You should be using GetTradingHouseSearchResultItemLink instead of GetTradingHouseSearchResultItemInfo.

lua Code:
  1. local function OnSearchResultsReceived(eventId, guildId, numItemsOnPage, currentPage, hasMorePages)
  2.     for i = 1, numItemsOnPage do
  3.         local itemLink = GetTradingHouseSearchResultItemLink(i)
  4.         local itemId = select(4, ZO_LinkHandler_ParseLink(itemLink)) --return value is a string
  5.         d(itemId)
  6.     end
  7. end
  8.  
  9. EVENT_MANAGER:RegisterForEvent("MyUniqueName", EVENT_TRADING_HOUSE_SEARCH_RESULTS_RECEIVED, OnSearchResultsReceived)
  Reply With Quote
01/11/15, 08:22 AM   #5
Sonar
Join Date: May 2014
Posts: 9
Originally Posted by Garkin View Post
You should be using GetTradingHouseSearchResultItemLink instead of GetTradingHouseSearchResultItemInfo.

lua Code:
  1. local function OnSearchResultsReceived(eventId, guildId, numItemsOnPage, currentPage, hasMorePages)
  2.     for i = 1, numItemsOnPage do
  3.         local itemLink = GetTradingHouseSearchResultItemLink(i)
  4.         local itemId = select(4, ZO_LinkHandler_ParseLink(itemLink)) --return value is a string
  5.         d(itemId)
  6.     end
  7. end
  8.  
  9. EVENT_MANAGER:RegisterForEvent("MyUniqueName", EVENT_TRADING_HOUSE_SEARCH_RESULTS_RECEIVED, OnSearchResultsReceived)
Thanks a million! But the GetTradingHouseSearchResultItemLink function isnt documented anywhere. How do you know about it?
  Reply With Quote
01/11/15, 09:01 AM   #6
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Sonar View Post
Thanks a million! But the GetTradingHouseSearchResultItemLink function isnt documented anywhere. How do you know about it?
It is in the ESOUIDocumentationP5.txt attached to this post:
http://forums.elderscrollsonline.com/discussion/135893/

And very useful is also EsoUI source code:
http://esodata.uesp.net/100010/
  Reply With Quote
01/11/15, 02:12 PM   #7
Sonar
Join Date: May 2014
Posts: 9
Thanks very much for your help!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » How do I get the item link for an item if I know its name and quality?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off