Sha256: 40da4b8bce385e3302c534a30f5e0142f227b6e4a69c07f349b47d7a0d8b4400

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

module Bearcat
  class Client < Footrest::Client
    module Courses

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

      def create_course(account_id, params={})
        post("/api/v1/accounts/#{account_id}/courses", params)
      end

      def update_course(course, params={})
        put("/api/v1/courses/#{course}", params)
      end

      def list_course_users(course, params={})
        get("/api/v1/courses/#{course}/users", params)
      end

      def course_quiz_extensions(course, params={})
        post("/api/v1/courses/#{course}/quiz_extensions", params)
      end

      def course_outcome_results(course, params={})
        get("/api/v1/courses/#{course}/outcome_results", params)
      end

      def create_content_migration(course, file_path, params={})
        response = post("/api/v1/courses/#{course}/content_migrations", params)
        pre_attachment = response['pre_attachment']
        confirmation_url = post_file(pre_attachment['upload_url'], pre_attachment['upload_params'], file_path)
        confirm_file_upload(confirmation_url)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bearcat-1.0.12 lib/bearcat/client/courses.rb
bearcat-1.0.11 lib/bearcat/client/courses.rb
bearcat-1.0.10 lib/bearcat/client/courses.rb
bearcat-1.0.9 lib/bearcat/client/courses.rb
bearcat-1.0.8 lib/bearcat/client/courses.rb
bearcat-1.0.7 lib/bearcat/client/courses.rb
bearcat-1.0.6 lib/bearcat/client/courses.rb