Sha256: 7606d9893a5741990c471f9130751fc516b1ec04d8bcfc642acb43c570c22d0d

Contents?: true

Size: 1.09 KB

Versions: 97

Compression:

Stored size: 1.09 KB

Contents

module Bearcat
  class Client < Footrest::Client
    module ContentExports

      def create_content_export(id, type, params = {})
        post("/api/v1/#{type}/#{id}/content_exports", params)
      end

      def create_course_export(id, params = {})
        create_content_export(id, 'courses', params)
      end

      def create_group_export(id, params = {})
        create_content_export(id, 'groups', params)
      end

      def create_user_export(id, params = {})
        create_content_export(id, 'users', params)
      end

      def get_content_export(id, export_id, type, params = {})
        get("/api/v1/#{type}/#{id}/content_exports/#{export_id}", params)
      end

      def get_course_export(course_id, export_id, params = {})
        get_content_export(course_id, export_id, 'courses', params)
      end

      def get_group_export(group_id, export_id, params = {})
        get_content_export(group_id, export_id, 'groups', params)
      end

      def get_user_export(user_id, export_id, params = {})
        get_content_export(user_id, export_id, 'users', params)
      end

    end
  end
end

Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
bearcat-1.5.37 lib/bearcat/client/content_exports.rb
bearcat-1.5.36 lib/bearcat/client/content_exports.rb
bearcat-1.5.35 lib/bearcat/client/content_exports.rb
bearcat-1.5.34 lib/bearcat/client/content_exports.rb
bearcat-1.5.33 lib/bearcat/client/content_exports.rb
bearcat-1.5.32 lib/bearcat/client/content_exports.rb
bearcat-1.5.31 lib/bearcat/client/content_exports.rb
bearcat-1.5.30 lib/bearcat/client/content_exports.rb
bearcat-1.5.29 lib/bearcat/client/content_exports.rb
bearcat-1.5.28 lib/bearcat/client/content_exports.rb
bearcat-1.5.28.beta1 lib/bearcat/client/content_exports.rb
bearcat-1.5.26 lib/bearcat/client/content_exports.rb
bearcat-1.5.24 lib/bearcat/client/content_exports.rb
bearcat-1.5.23 lib/bearcat/client/content_exports.rb
bearcat-1.5.20 lib/bearcat/client/content_exports.rb
bearcat-1.5.19 lib/bearcat/client/content_exports.rb
bearcat-1.5.17 lib/bearcat/client/content_exports.rb
bearcat-1.5.16 lib/bearcat/client/content_exports.rb
bearcat-1.5.15 lib/bearcat/client/content_exports.rb
bearcat-1.5.14 lib/bearcat/client/content_exports.rb