0.0
No commit activity in last 3 years
No release in over 3 years
API Géo. More info at https://api.gouv.fr/api/api-geo.html. Generated by Cashbee https://www.cashbee.fr
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 4.4, >= 4.4.6
~> 0.2, >= 0.2.12
~> 0.2, >= 0.2.16
~> 4.1, >= 4.1.2
>= 3.6.0, ~> 3.6
~> 3.0, >= 3.0.1
~> 1.24, >= 1.24.3

Runtime

>= 2.1.0, ~> 2.1
~> 1.0, >= 1.0.1
 Project Readme

api_geo_client

ApiGeoClient - the Ruby gem for the API Référentiels géographiques

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0-beta
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build api_geo_client.gemspec

Then either install the gem locally:

gem install ./api_geo_client-1.0.0.gem

(for development, run gem install --dev ./api_geo_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 'api_geo_client', '~> 1.0.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 'api_geo_client', :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 'api_geo_client'

api_instance = ApiGeoClient::CommunesApi.new

code = 'code_example' # String | Code INSEE de la commune

opts = { 
  fields: ['[\"nom\",\"code\",\"codesPostaux\",\"codeDepartement\",\"codeRegion\",\"population\"]'], # Array<String> | Liste des champs souhaités dans la réponse
  format: 'json', # String | Format de réponse attendu
  geometry: 'centre' # String | Géométrie à utiliser pour la sortie géographique
}

begin
  #Récupérer les informations concernant une commune
  result = api_instance.communes_code_get(code, opts)
  p result
rescue ApiGeoClient::ApiError => e
  puts "Exception when calling CommunesApi->communes_code_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://geo.api.gouv.fr

Class Method HTTP request Description
ApiGeoClient::CommunesApi communes_code_get GET /communes/{code} Récupérer les informations concernant une commune
ApiGeoClient::CommunesApi communes_get GET /communes Recherche des communes
ApiGeoClient::CommunesApi departements_code_communes_get GET /departements/{code}/communes Renvoi les communes d'un département
ApiGeoClient::DpartementsApi departements_code_communes_get GET /departements/{code}/communes Renvoi les communes d'un département
ApiGeoClient::DpartementsApi departements_code_get GET /departements/{code} Récupérer les informations concernant un département
ApiGeoClient::DpartementsApi departements_get GET /departements Recherche des départements
ApiGeoClient::DpartementsApi regions_code_departements_get GET /regions/{code}/departements Renvoi les départements d'une région
ApiGeoClient::RgionsApi regions_code_departements_get GET /regions/{code}/departements Renvoi les départements d'une région
ApiGeoClient::RgionsApi regions_code_get GET /regions/{code} Récupérer les informations concernant une région
ApiGeoClient::RgionsApi regions_get GET /regions Recherche des régions

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.