Constantize the API Adresse URL
This commit is contained in:
parent
ca8af0e904
commit
a7a6898ce3
2 changed files with 2 additions and 5 deletions
|
@ -8,13 +8,9 @@ module ApiAdresse
|
|||
end
|
||||
|
||||
def call
|
||||
RestClient.get(api_url, params: { q: @address, limit: @limit })
|
||||
RestClient.get(API_ADRESSE_URL, params: { q: @address, limit: @limit })
|
||||
rescue RestClient::ServiceUnavailable
|
||||
nil
|
||||
end
|
||||
|
||||
def api_url
|
||||
'http://api-adresse.data.gouv.fr/search'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# API URLs
|
||||
API_ADRESSE_URL = "http://api-adresse.data.gouv.fr/search"
|
||||
API_CARTO_URL = "https://apicarto.sgmap.fr"
|
||||
API_ENTREPRISE_URL = "https://entreprise.api.gouv.fr/v2"
|
||||
API_GEO_URL = "https://geo.api.gouv.fr"
|
||||
|
|
Loading…
Reference in a new issue