Minimum Wage API - Ruby Gem

Minimum Wage provides current minimum wage rates for all US states plus the federal minimum. Includes tipped minimum wages, effective rates (higher of state or federal), and historical federal minimum wage data.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_minimumwage'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_minimumwage

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_minimumwage'

# Initialize the client
client = APIVerve::Minimumwage::Client.new(api_key: "YOUR_API_KEY")

# Make a request
response = client.execute({
  state: "CA",
  year: 2024
})

# Print the response
puts response

Error Handling

begin
  response = client.execute({ state: "CA", year: 2024 })
  puts response["data"]
rescue APIVerve::Minimumwage::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Minimumwage::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

# Enable debug logging
client = APIVerve::Minimumwage::Client.new(
  api_key: "YOUR_API_KEY",
  debug: true
)

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "state": "CA",
    "stateName": "California",
    "minimumWage": 16,
    "stateRate": 16,
    "federalRate": 7.25,
    "tippedMinimum": 16,
    "usesFederalRate": false,
    "aboveFederal": true,
    "federalDifference": 8.75,
    "annualIncome40hrs": 33280,
    "note": null,
    "formatted": {
      "minimumWage": "$16.00/hr",
      "annualIncome": "$33,280.00"
    }
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.