Project

pointpin

0.0
No commit activity in last 3 years
No release in over 3 years
Pointp.in API wrapper in Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2
>= 0
>= 0
>= 0

Runtime

 Project Readme

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

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