Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# IpinfoIo

...
Use the ipinfo.io IP lookup API wrapper to quickly and simply integrate IP geolocation. Save yourself the hassle of setting up local GeoIP libraries and having to remember to regularly update the data.

## Installation

Expand All @@ -14,14 +14,33 @@ gem 'ipinfo_io'

And then execute:

$ bundle
$ bundle install

Or install it yourself as:

$ gem install ipinfo_io

## Usage
Not yeat published on rubygems.org

Most obvious way to use this script:

```
IpinfoIo::lookup(ip)
```

You can also include it:

```
class YourClass
include IpinfoIo

def some_method
lookup(ip)
end
end
```

API has a rate limit of 1,000 API requests per day. If you do more then that, then expect `IpinfoIo::RateLimitError` to appear.

### Requirements
- Ruby 2.0+
Expand All @@ -40,8 +59,7 @@ Setting up project:
- `bundle install`
- Check that your IDE/editor can handle [.editorconfig](http://editorconfig.org) file

Running tests is easy:
- `bundle exec rake`
Running tests is as easy as `bundle exec rake`

Bug reports and pull requests are welcome on GitHub at https://github.com/ipinfoio/ruby/.