otac0n / ESO-LibPrice

ESO Add-on library for fetching price data from other add-ons such as Master Merchant or Arkadius' Trade Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LibPrice

A library for gathering an item's cost from various add-ons:

As well as some hard-coded data from

  • The Crown Store
  • Rolis Hlaalu, the Mastercraft Mediator
  • Faustina Curio, the Achievement Mediator

GitHub Repo

https://github.com/ziggr/ESO-LibPrice

Example Code

function LibPrice_Example.SlashCommand()
    local self = LibPrice_Example

    for _,item_link in ipairs(EXAMPLE_ITEMS) do
                        -- Just tell me how much this thing costs.
        local gold   = LibPrice.ItemLinkToPriceGold(item_link)

                        -- Okay, I changed my mind. Tell me a little more:
                        -- where'd you get  this price from?
                        -- (additional return values from same API)
        gold, source_key, field_name
                     = LibPrice.ItemLinkToPriceGold(item_link)
        local header = self.FormatHeader(item_link, gold, source_key, field_name)
        d(header)

                        -- Give me all the data you can find, I'll figure out
                        -- what to do with it later.
        local result = LibPrice.ItemLinkToPriceData(item_link)
        LibPrice_Example.DumpTable(result)
    end
end

example

About

ESO Add-on library for fetching price data from other add-ons such as Master Merchant or Arkadius' Trade Tools


Languages

Language:Lua 93.8%Language:Perl 4.4%Language:Makefile 1.9%