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
- Host: GitHub
- URL: https://github.com/eansearch/lua-barcode-lookup
- Owner: eansearch
- Created: 2025-04-14T15:20:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-14T15:56:54.000Z (about 1 year ago)
- Last Synced: 2025-04-14T16:47:33.599Z (about 1 year ago)
- Topics: barcode, ean, gtin, isbn, isbn-10, isbn-13, lookup, lua, upc
- Language: Lua
- Homepage: https://www.ean-search.org
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"))