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.4.13 lib/bearcat/client/sections.rb
bearcat-1.4.12 lib/bearcat/client/sections.rb
bearcat-1.4.11 lib/bearcat/client/sections.rb
bearcat-1.4.10 lib/bearcat/client/sections.rb
bearcat-1.4.9 lib/bearcat/client/sections.rb
bearcat-1.4.8 lib/bearcat/client/sections.rb
bearcat-1.4.7 lib/bearcat/client/sections.rb
bearcat-1.4.6 lib/bearcat/client/sections.rb
bearcat-1.4.5 lib/bearcat/client/sections.rb
bearcat-1.4.4 lib/bearcat/client/sections.rb
bearcat-1.4.3 lib/bearcat/client/sections.rb
bearcat-1.4.2 lib/bearcat/client/sections.rb
bearcat-1.4.1 lib/bearcat/client/sections.rb
bearcat-1.4.0 lib/bearcat/client/sections.rb
bearcat-1.3.55 lib/bearcat/client/sections.rb
bearcat-1.3.53 lib/bearcat/client/sections.rb
bearcat-1.3.52 lib/bearcat/client/sections.rb
bearcat-1.3.51 lib/bearcat/client/sections.rb
bearcat-1.3.49 lib/bearcat/client/sections.rb
bearcat-1.3.48 lib/bearcat/client/sections.rb