Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi_iplocation

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi_iplocation

  • 1.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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:

  • API version: 1.1.0
  • Package version: 1.1.0
  • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://github.com/oapicf/openapi-iplocation

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:

# Load the gem
require 'openapi_iplocation'

api_instance = OpenApiIplocationClient::DefaultApi.new
ip = 'ip_example' # String | An IPv4 or IPv6 address that you would like to lookup.
opts = {
  format: 'format_example', # String | Output format, the following formats are supported: plain xml json jsonp php csv serialized
  delimiter: 'delimiter_example' # String | Delimiter between proxies. Can be used only with format plain. The following types are supported: 1 for \"\\n\", 2 for \"<br>\".
}

begin
  #Get geolocation of an IP address
  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

ClassMethodHTTP requestDescription
OpenApiIplocationClient::DefaultApiroot_getGET /Get geolocation of an IP address

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

FAQs

Package last updated on 02 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc