8000 GitHub - mull/locationiq-ruby-client
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mull/locationiq-ruby-client

 
 

Repository files navigation

locationiq-ruby-client

LocationIQClient - the Ruby gem for the LocationIQ

LocationIQ provides flexible enterprise-grade location based solutions. We work with developers, startups and enterprises worldwide serving billions of requests everyday. This page provides an overview of the technical aspects of our API and will help you get started.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build locationiq-ruby-client.gemspec

Then either install the gem locally:

gem install ./locationiq-ruby-client-1.0.0.gem

(for development, run gem install --dev ./locationiq-ruby-client-1.0.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 'locationiq-ruby-client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/location-iq/locationiq-ruby-client, then add the following in the Gemfile:

gem 'locationiq-ruby-client', :git => 'https://github.com/location-iq/locationiq-ruby-client.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 'locationiq-ruby-client'

# Setup authorization
LocationIQClient.configure do |config|
  # Configure API key authorization: key
  config.api_key['key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['key'] = 'Bearer'
end

api_instance = LocationIQClient::BalanceApi.new

begin
  result = api_instance.balance
  p result
rescue LocationIQClient::ApiError => e
  puts "Exception when calling BalanceApi->balance: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://eu1.locationiq.com/v1

Class Method HTTP request Description
LocationIQClient: 5C08 :BalanceApi balance GET /balance.php
LocationIQClient::ReverseApi reverse GET /reverse.php Reverse Geocoding
LocationIQClient::SearchApi search GET /search.php Forward Geocoding

Documentation for Models

Documentation for Authorization

key

  • Type: API key
  • API key parameter name: key
  • Location: URL query string

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 98.5%
  • Shell 1.5%
0