Minimalistic MaxMind API wrapper for Ruby.
Faraday
is the only runtime dependency.
Supports only #city
API call. API compatible with Geoip2.city
.
Add this line to your application's Gemfile:
gem 'mxmnd'
Mxmnd.city('8.8.8.8')
If you want to use faraday options, you can pass them as a second parameter:
Mxmnd.city('8.8.8.8', request: {timeout: 1})
The gem is available as open source under the terms of the MIT License.