app/services/ons_data_import/base.rb
# Security note: "ESMARspQHYMw9BZ9" looks like an API key, but it's just a service name
Security note: "ESMARspQHYMw9BZ9" looks like an API key, but it's just a service name
Security note : " ESMARspQHYMw9BZ9 " looks like an API key but it ' s just a service name
def arcgis_features(offset)
    params = [
      "where=1%3D1",
      "outSR=4326",
      "f=pgeojson",
      "outFields=#{name_field}",
      "resultRecordCount=#{PER_PAGE}",
      "resultOffset=#{offset * PER_PAGE}",
    ].join("&")
    response = HTTParty.get("#{ARCGIS_BASE_URL}#{api_name}/FeatureServer/0/query?#{params}")
    raise "Unexpected ArcGIS response: #{response.code}" unless response.success?
    JSON.parse(response.to_s)["features"]
  end
def arcgis_features ( offset ) params = [ "where=1%3D1" , "outSR=4326" , "f=pgeojson" , "outFields=#{name_field}" , "resultRecordCount=#{PER_PAGE}" , "resultOffset=#{offset * PER_PAGE}" , ] . join ( "&" ) response = HTTParty . get ( "#{ARCGIS_BASE_URL}#{api_name}/FeatureServer/0/query?#{params}" ) raise "Unexpected ArcGIS response: #{response.code}" unless response . success? JSON . parse ( response . to_s ) [ "features" ] end
Security note: "ESMARspQHYMw9BZ9" looks like an API key, but it's just a service name
Security note : " ESMARspQHYMw9BZ9 " looks like an API key but it ' s just a service name
offset