course_listings_controller.rb 570 Bytes
Newer Older
Zac Wood's avatar
Zac Wood committed
1
class API::CourseListingsController < ApplicationController
2 3 4
  resource_description do
    short 'Working with courses and associated sections'
  end
Zach Perkins's avatar
Zach Perkins committed
5

6 7 8 9 10 11
  # api :GET, '/course_listings', "Get all available courses and their sections"
  # param :subject, String, desc: 'Course subject, e.g. "CS" or "ACCT"'
  # param :number, Integer, desc: 'Course number, e.g. "112"'
  # def index
  #   # Make a separate list so that we can include sections
  #   @courses = API::CourseListingsHelper::CourseListing.wrap(Course.fetch(params).all)
Zach Perkins's avatar
Zach Perkins committed
12

13 14
  #   render json: @courses
  # end
15
end