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.3.21 lib/bearcat/client/content_exports.rb
bearcat-1.3.20 lib/bearcat/client/content_exports.rb
bearcat-1.3.19 lib/bearcat/client/content_exports.rb
bearcat-1.3.18 lib/bearcat/client/content_exports.rb
bearcat-1.3.17 lib/bearcat/client/content_exports.rb
bearcat-1.3.16 lib/bearcat/client/content_exports.rb
bearcat-1.3.15 lib/bearcat/client/content_exports.rb
bearcat-1.3.14 lib/bearcat/client/content_exports.rb
bearcat-1.3.13 lib/bearcat/client/content_exports.rb
bearcat-1.3.12 lib/bearcat/client/content_exports.rb
bearcat-1.3.11 lib/bearcat/client/content_exports.rb
bearcat-1.3.10 lib/bearcat/client/content_exports.rb
bearcat-1.3.9 lib/bearcat/client/content_exports.rb
bearcat-1.3.8 lib/bearcat/client/content_exports.rb
bearcat-1.3.7 lib/bearcat/client/content_exports.rb
bearcat-1.3.6 lib/bearcat/client/content_exports.rb
bearcat-1.3.5 lib/bearcat/client/content_exports.rb