Pointp.in

Pointp.in API wrapper in Ruby.

Installation

gem install pointpin

or in your Gemfile

gem 'pointpin'

Usage

Make sure you require the library.

require 'pointpin'

You will need to set your API key before you can make requests to the Pointp.in API.

Pointpin.api_key = 'this-is-your-api-key'

You can then make requests to the Pointpin.locate(ip_address) method.

Get location data for an IP address:

location = Pointpin.locate('55.111.555.555')

Please refer to the pointp.in docs for more information on the full response properties.

The gem uses Faraday for HTTP requests. It uses Net::HTTP by default, but changing the adapter is pretty straightforward.

Copyright (c) 2014 Brian Flanagan. See LICENSE.txt for further details.