Module: Bearcat::Client::ContentExports

Defined in:
lib/bearcat/client/content_exports.rb

Instance Method Summary collapse

Instance Method Details

#create_content_export(id, type, params = {}) ⇒ Object



5
6
7
# File 'lib/bearcat/client/content_exports.rb', line 5

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

#create_course_export(id, params = {}) ⇒ Object



9
10
11
# File 'lib/bearcat/client/content_exports.rb', line 9

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

#create_group_export(id, params = {}) ⇒ Object



13
14
15
# File 'lib/bearcat/client/content_exports.rb', line 13

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

#create_user_export(id, params = {}) ⇒ Object



17
18
19
# File 'lib/bearcat/client/content_exports.rb', line 17

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

#get_content_export(id, export_id, type, params = {}) ⇒ Object



21
22
23
# File 'lib/bearcat/client/content_exports.rb', line 21

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

#get_course_export(course_id, export_id, params = {}) ⇒ Object



25
26
27
# File 'lib/bearcat/client/content_exports.rb', line 25

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

#get_group_export(group_id, export_id, params = {}) ⇒ Object



29
30
31
# File 'lib/bearcat/client/content_exports.rb', line 29

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

#get_user_export(user_id, export_id, params = {}) ⇒ Object



33
34
35
# File 'lib/bearcat/client/content_exports.rb', line 33

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