Sha256: e79a9549f336199b25d1884f7d72f573f65cc87221282951a71c89cc59da645b

Contents?: true

Size: 739 Bytes

Versions: 23

Compression:

Stored size: 739 Bytes

Contents

module Bearcat
  class Client < Footrest::Client
    module Enrollments

      def user_enrollments(user, params={})
        get("/api/v1/users/#{user.to_s}/enrollments", params)
      end

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

      def section_enrollments(section, params={})
        get("/api/v1/sections/#{section.to_s}/enrollments", params)
      end

      def enroll_in_section(section, params={})
        post("/api/v1/sections/#{section.to_s}/enrollments", params)
      end

      def conclude_enrollment(course, enrollment, params={})
        delete("/api/v1/courses/#{course}/enrollments/#{enrollment}", params)
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
bearcat-0.9.18 lib/bearcat/client/enrollments.rb
bearcat-0.9.17 lib/bearcat/client/enrollments.rb
bearcat-0.9.16 lib/bearcat/client/enrollments.rb
bearcat-0.9.15 lib/bearcat/client/enrollments.rb
bearcat-0.9.14 lib/bearcat/client/enrollments.rb
bearcat-0.9.13 lib/bearcat/client/enrollments.rb
bearcat-0.9.12 lib/bearcat/client/enrollments.rb
bearcat-0.9.10 lib/bearcat/client/enrollments.rb
bearcat-0.9.9 lib/bearcat/client/enrollments.rb
bearcat-0.9.8 lib/bearcat/client/enrollments.rb
bearcat-0.9.7 lib/bearcat/client/enrollments.rb
bearcat-0.9.6 lib/bearcat/client/enrollments.rb
bearcat-0.9.5 lib/bearcat/client/enrollments.rb
bearcat-0.9.4 lib/bearcat/client/enrollments.rb
bearcat-0.9.3 lib/bearcat/client/enrollments.rb
bearcat-0.9.2 lib/bearcat/client/enrollments.rb
bearcat-0.9.1 lib/bearcat/client/enrollments.rb
bearcat-0.9 lib/bearcat/client/enrollments.rb
bearcat-0.8 lib/bearcat/client/enrollments.rb
bearcat-0.7 lib/bearcat/client/enrollments.rb