Shoe Size Converter API - Ruby Gem
Shoe Size Converter is a tool for converting shoe sizes between US, UK, EU, CM, JP, AU, MX, and KR standards. It supports men, women, unisex, and child sizes.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_shoesizeconverter'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_shoesizeconverter
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_shoesizeconverter'
# Initialize the client
client = APIVerve::Shoesizeconverter::Client.new(api_key: "YOUR_API_KEY")
# Make a request
response = client.execute({
size: "9",
from: "us",
gender: "unisex"
})
# Print the response
puts response
Error Handling
begin
response = client.execute({ size: "9", from: "us", gender: "unisex" })
puts response["data"]
rescue APIVerve::Shoesizeconverter::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Shoesizeconverter::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Shoesizeconverter::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"input_size": 9,
"input_region": "US",
"gender": "men",
"conversions": {
"cm": 29.1,
"jp": 29.1,
"us": 9,
"uk": 8.1,
"au": 8.1,
"eu": 43.7,
"mx": 13.7,
"kr": 43.7
},
"note": "Sizes are approximate and may vary by manufacturer"
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://apiverve.com/marketplace/shoesizeconverter?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.