Sha256: 72dd1c56af5d32575751f27d0f175edd447853972231e757efd1cb57c34d6348

Contents?: true

Size: 1.37 KB

Versions: 15

Compression:

Stored size: 1.37 KB

Contents

module Bearcat
  class Client < Footrest::Client
    module BlueprintCourses

      # Get blueprint information
      # https://canvas.instructure.com/doc/api/blueprint_courses.html#method.master_courses/master_templates.show
      def blueprint_template(course, template_id='default')
        get("/api/v1/courses/#{course}/blueprint_templates/#{template_id}")
      end

      # List blueprint subscriptions
      # https://canvas.instructure.com/doc/api/blueprint_courses.html#method.master_courses/master_templates.subscriptions_index
      def blueprint_subscriptions(course)
        get("/api/v1/courses/#{course}/blueprint_subscriptions")
      end

      # Update associated courses
      # https://canvas.instructure.com/doc/api/blueprint_courses.html#method.master_courses/master_templates.update_associations
      def blueprint_update_associations(course, template_id='default', params={})
        put("/api/v1/courses/#{course}/blueprint_templates/#{template_id}/update_associations", params)
      end

      # Begin a migration to push to associated courses
      # https://canvas.instructure.com/doc/api/blueprint_courses.html#method.master_courses/master_templates.queue_migration
      def start_blueprint_migration(course, template_id='default', params={})
        post("/api/v1/courses/#{course}/blueprint_templates/#{template_id}/migrations", params)
      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bearcat-1.4.13 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.12 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.11 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.10 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.9 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.8 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.7 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.6 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.5 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.4 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.3 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.2 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.1 lib/bearcat/client/blueprint_courses.rb
bearcat-1.4.0 lib/bearcat/client/blueprint_courses.rb
bearcat-1.3.55 lib/bearcat/client/blueprint_courses.rb