Add API_CARTO_URL
This commit is contained in:
parent
96806379e9
commit
1839269dd9
2 changed files with 6 additions and 8 deletions
|
@ -3,13 +3,13 @@ class CARTO::SGMAP::API
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.search_qp(geojson)
|
def self.search_qp(geojson)
|
||||||
endpoint = "/quartiers-prioritaires/search"
|
url = [API_CARTO_URL, "quartiers-prioritaires", "search"].join("/")
|
||||||
call(base_url + endpoint, { geojson: geojson.to_s })
|
call(url, { geojson: geojson.to_s })
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.search_cadastre(geojson)
|
def self.search_cadastre(geojson)
|
||||||
endpoint = "/cadastre/geometrie"
|
url = [API_CARTO_URL, "cadastre", "geometrie"].join("/")
|
||||||
call(base_url + endpoint, { geojson: geojson.to_s })
|
call(url, { geojson: geojson.to_s })
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -25,8 +25,4 @@ class CARTO::SGMAP::API
|
||||||
rescue RestClient::InternalServerError
|
rescue RestClient::InternalServerError
|
||||||
raise RestClient::ResourceNotFound
|
raise RestClient::ResourceNotFound
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.base_url
|
|
||||||
'https://apicarto.sgmap.fr'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
API_CARTO_URL = "https://apicarto.sgmap.fr"
|
||||||
|
|
||||||
API_ENTREPRISE_URL = 'https://entreprise.api.gouv.fr/v2'
|
API_ENTREPRISE_URL = 'https://entreprise.api.gouv.fr/v2'
|
||||||
|
|
||||||
PIPEDRIVE_API_URL = 'https://api.pipedrive.com/v1'
|
PIPEDRIVE_API_URL = 'https://api.pipedrive.com/v1'
|
||||||
|
|
Loading…
Reference in a new issue