rails-acnh-randomizer / app / controllers / api / v1 / acnh_villagers_controller.rb
acnh_villagers_controller.rb
Raw
class Api::V1::AcnhVillagersController < ApplicationController
  # GET /acnh_villagers/1
  def show
    @response = HTTParty.get("https://acnhapi.com/v1/villagers/#{params[:id]}")
    logger.debug "Response #{@response}" 
    render json: @response
  end

end