Skip to content

pointpin/pointpin-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Pointpin ip geolocation api service https://pointp.in

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages