An open API service indexing awesome lists of open source software.

https://github.com/eansearch/lua-barcode-lookup

Lua package to for EAN, UPC and ISBN name lookup and validation
https://github.com/eansearch/lua-barcode-lookup

barcode ean gtin isbn isbn-10 isbn-13 lookup lua upc

Last synced: about 1 year ago
JSON representation

Lua package to for EAN, UPC and ISBN name lookup and validation

Awesome Lists containing this project

README

          

# lua-barcode-lookup

A Lua package or EAN, UPC, GTIN and ISBN name lookup and validation

```lua
local barcodeLookup = BarcodeLookup:new(os.getenv("EAN_SEARCH_API_TOKEN"))

local product = barcodeLookup:barcodeLookup("5099750442227")
if (product.error) then
print(product.error)
else
print(product.name, product.categoryName)
end
local product = barcodeLookup:barcodeLookup("5099750442228")
if (product.error) then
print(product.error)
else
print(product.name, product.categoryName)
end

local productList = barcodeLookup:productSearch("iphone 16")
local i = 1
while productList[i] ~= nil do
print(productList[i].ean, productList[i].name, productList[i].categoryName)
i = i + 1
end

print (barcodeLookup:verifyChecksum("5099750442227"))
print (barcodeLookup:verifyChecksum("5099750442228"))

print (barcodeLookup:issuingCountryLookup("5099750442227"))