module Bearcat class Client < Footrest::Client module Courses def course(course, params={}) get("/api/v1/courses/#{course}", params) end def create_course(account_id, params={}) post("/api/v1/accounts/#{account_id}/courses", params) end def list_course_users(course, params={}) get("/api/v1/courses/#{course}/users", params) end def create_content_migration(course, file_path, params={}) response = post("/api/v1/courses/#{course}/content_migrations", params) pre_attachment = response['pre_attachment'] confirmation_url = post_file(pre_attachment['upload_url'], pre_attachment['upload_params'], file_path) confirm_file_upload(confirmation_url) end end end end