Result of GunsNPrices.parse_title/2. Fields that don't apply or weren't found are nil (or empty).
title- the title as givenkind-:firearmor:ammobrand- brand of the identified model, else the:brandoption, else""model- aGunsNPrices.ModelMatch, firearms onlycaliber- first caliber in the title (GunsNPrices.Caliber)calibers- every caliber in the title (".357 Mag / .38 Special"), in ordercapacity- magazine capacity, firearms only (for "15+1" it is 15)barrel_length- barrel length in inches (float), firearms onlyrounds- rounds per box, ammo onlycost_per_round- price per round, ammo only; needs the:priceoption
Encodes to JSON with the same field names as the Python and JavaScript packages.
Summary
Types
@type t() :: %GunsNPrices.ProductInfo{ barrel_length: float() | nil, brand: String.t(), caliber: GunsNPrices.Caliber.t() | nil, calibers: [GunsNPrices.Caliber.t()], capacity: pos_integer() | nil, cost_per_round: float() | nil, kind: :firearm | :ammo, model: GunsNPrices.ModelMatch.t() | nil, rounds: pos_integer() | nil, title: String.t() }