UnitConvert - We created a package/api for helping with unit comparisons and conversions
We were working with a client on a project recently that involved needing to compare measurements against a ruleset. We were looking at needing to run comparisons against over 50 different unit types and hoping the user input matched something that fell into our conversion array. This all lead to the development of our latest project, UnitConvert.
UnitConvert is a simple API to help developers quickly compare and convert measurements without needing to manually setup all of their work themselves. We have been creating a database of conversions and will be monitoring for any failed conversations and immediately adding them to our database.
We created a Nuget package specifically for this project that makes it easy to get it going. Converting measurements is as simple as await client.ConvertMeasurementAsync('10 miles', 'km'). Or you can compare measurements like await CompareMeasurementsAsync("11 inches", ComparisonType.GreaterThan, "4 cm"). You don't even need to prep the strings to make them "readable". We have been capturing variations of different measurements and storing them in the database, so you can use "Miles", "mile", "MI" and we will automatically start feeding in Miles.
Give it a shot and let me know what you think. You can see a demo of what the results look like with the API call on our website. I hope it benefits somebody!
0 comments:
Post a Comment