Class: V1::Facilities::VAController

Inherits:
FacilitiesController
  • Object
show all
Defined in:
app/controllers/v1/facilities/va_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

Index supports the following query parameters:

Parameters:

  • bbox
    • Bounding box in form “xmin,ymin,xmax,ymax” in Lat/Long coordinates

  • type
    • Optional facility type, values = all (default), health, benefits, cemetery

  • services
    • Optional specialty services filter



10
11
12
13
14
# File 'app/controllers/v1/facilities/va_controller.rb', line 10

def index
  api_results = api.get_facilities(lighthouse_params)

  render_json(serializer, lighthouse_params, api_results)
end

#showObject



16
17
18
19
20
# File 'app/controllers/v1/facilities/va_controller.rb', line 16

def show
  api_result = api.get_by_id(params[:id])

  render_json(serializer, lighthouse_params, api_result)
end