Sha256: 0b2ad966bf2511b5339740bbaaaa96599ea9630342bcbcdfbc466a0bd695648f

Contents?: true

Size: 880 Bytes

Versions: 21

Compression:

Stored size: 880 Bytes

Contents

module Bearcat
  class Client < Footrest::Client
    module Sections

      def course_sections(course, params={})
        get("/api/v1/courses/#{course.to_s}/sections", params)
      end

      def section(section)
        get("/api/v1/sections/#{section.to_s}")
      end

      def create_section(course, params)
        post("/api/v1/courses/#{course.to_s}/sections", params)
      end

      def update_section(section, params)
        put("/api/v1/sections/#{section.to_s}", params)
      end

      def delete_section(section)
        delete("/api/v1/sections/#{section.to_s}")
      end

      def crosslist_section(section_id, new_course_id)
        post("/api/v1/sections/#{section_id.to_s}/crosslist/#{new_course_id.to_s}")
      end

      def decrosslist_section(section_id)
        delete("/api/v1/sections/#{section_id.to_s}/crosslist")
      end

    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
bearcat-1.3.47 lib/bearcat/client/sections.rb