Sha256: 52247e6a915e867d2a2dcf6998962a91a1e9fb47398223b8c55db0540ea59a80

Contents?: true

Size: 1.62 KB

Versions: 38

Compression:

Stored size: 1.62 KB

Contents

module Bearcat
  class Client < Footrest::Client
    module Assignments

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

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

      def assignment_overrides(course, assignment)
        get("/api/v1/courses/#{course}/assignments/#{assignment}/overrides")
      end

      def all_assignment_overrides(course_id)
        get("/api/v1/courses/#{course_id}/assignments/overrides")
      end

      def create_assignment_override(course, assignment, params)
        post("api/v1/courses/#{course}/assignments/#{assignment}/overrides", params)
      end

      def delete_assignment_override(course_id, assignment_id, override_id, params={})
        delete("api/v1/courses/#{course_id}/assignments/#{assignment_id}/overrides/#{override_id}", params)
      end

      def batch_create_assignment_overrides(course_id, params)
        post("/api/v1/courses/#{course_id}/assignments/overrides", params)
      end

      def batch_update_assignment_overrides(course_id, params)
        put("/api/v1/courses/#{course_id}/assignments/overrides", params)
      end

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

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

      def delete_assignment(course, assignment)
        delete("/api/v1/courses/#{course}/assignments/#{assignment}")
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
bearcat-1.3.47 lib/bearcat/client/assignments.rb
bearcat-1.3.46 lib/bearcat/client/assignments.rb
bearcat-1.3.45 lib/bearcat/client/assignments.rb
bearcat-1.3.44 lib/bearcat/client/assignments.rb
bearcat-1.3.43 lib/bearcat/client/assignments.rb
bearcat-1.3.41 lib/bearcat/client/assignments.rb
bearcat-1.3.40 lib/bearcat/client/assignments.rb
bearcat-1.3.39 lib/bearcat/client/assignments.rb
bearcat-1.3.38 lib/bearcat/client/assignments.rb
bearcat-1.3.37 lib/bearcat/client/assignments.rb
bearcat-1.3.36 lib/bearcat/client/assignments.rb
bearcat-1.3.35 lib/bearcat/client/assignments.rb
bearcat-1.3.34 lib/bearcat/client/assignments.rb
bearcat-1.3.33 lib/bearcat/client/assignments.rb
bearcat-1.3.32 lib/bearcat/client/assignments.rb
bearcat-1.3.30 lib/bearcat/client/assignments.rb
bearcat-1.3.28 lib/bearcat/client/assignments.rb
bearcat-1.3.27 lib/bearcat/client/assignments.rb