openapi_iplocation
OpenApiIplocationClient - the Ruby gem for the iplocation.net API
OpenAPI v3 specification and a set of generated API clients for iplocation.net
This SDK is automatically generated by the OpenAPI Generator project:
Installation
Build a gem
To build the Ruby code into a gem:
gem build openapi_iplocation.gemspec
Then either install the gem locally:
gem install ./openapi_iplocation-1.1.0.gem
(for development, run gem install --dev ./openapi_iplocation-1.1.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'openapi_iplocation', '~> 1.1.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'openapi_iplocation', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
require 'openapi_iplocation'
api_instance = OpenApiIplocationClient::DefaultApi.new
ip = 'ip_example'
opts = {
format: 'format_example',
delimiter: 'delimiter_example'
}
begin
result = api_instance.root_get(ip, opts)
p result
rescue OpenApiIplocationClient::ApiError => e
puts "Exception when calling DefaultApi->root_get: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.iplocation.net
Class | Method | HTTP request | Description |
---|
OpenApiIplocationClient::DefaultApi | root_get | GET / | Get geolocation of an IP address |
Documentation for Models
Documentation for Authorization
Endpoints do not require authorization.