zeitwerk: Api -> API
This commit is contained in:
parent
482f990594
commit
150ddab660
82 changed files with 235 additions and 217 deletions
|
@ -1,4 +1,4 @@
|
|||
class ApiCarto::API
|
||||
class APICarto::API
|
||||
class ResourceNotFound < StandardError
|
||||
end
|
||||
|
||||
|
@ -16,7 +16,7 @@ class ApiCarto::API
|
|||
response.body
|
||||
else
|
||||
message = response.code == 0 ? response.return_message : response.code.to_s
|
||||
Rails.logger.error "[ApiCarto] Error on #{url}: #{message}"
|
||||
Rails.logger.error "[APICarto] Error on #{url}: #{message}"
|
||||
raise ResourceNotFound
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
class ApiCarto::CadastreAdapter
|
||||
class APICarto::CadastreAdapter
|
||||
def initialize(coordinates)
|
||||
@coordinates = GeojsonService.to_json_polygon_for_cadastre(coordinates)
|
||||
end
|
||||
|
||||
def data_source
|
||||
@data_source ||= JSON.parse(ApiCarto::API.search_cadastre(@coordinates), symbolize_names: true)
|
||||
@data_source ||= JSON.parse(APICarto::API.search_cadastre(@coordinates), symbolize_names: true)
|
||||
end
|
||||
|
||||
def results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue