Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/valve/mxmnd

Minimal MaxMind API wrapper for Ruby
https://github.com/valve/mxmnd

geocoding ip-address maxmind maxmind-geoip2-api ruby

Last synced: about 2 months ago
JSON representation

Minimal MaxMind API wrapper for Ruby

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/Valve/mxmnd.svg?branch=master)](https://travis-ci.org/Valve/mxmnd)
[![Code Climate](https://codeclimate.com/github/Valve/mxmnd/badges/gpa.svg)](https://codeclimate.com/github/Valve/mxmnd)
[![Gem Version](https://badge.fury.io/rb/mxmnd.svg)](https://badge.fury.io/rb/mxmnd)
# Mxmnd

Minimalistic MaxMind API wrapper for Ruby.

`Faraday` is the only runtime dependency.

Supports only `#city` API call. API compatible with `Geoip2.city`.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'mxmnd'
```

## Usage

```ruby
Mxmnd.city('8.8.8.8')
```

If you want to use faraday options, you can pass them as a second parameter:

```ruby
Mxmnd.city('8.8.8.8', request: {timeout: 1})
```

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).