Module: GithubToCanvasQuiz::CanvasAPI::Endpoints::Quizzes
- Included in:
- GithubToCanvasQuiz::CanvasAPI::Endpoints
- Defined in:
- lib/github_to_canvas_quiz/canvas_api/endpoints/quizzes.rb
Instance Method Summary collapse
- #create_quiz(course_id, payload) ⇒ Object
- #get_single_quiz(course_id, id) ⇒ Object
- #list_quizzes(course_id) ⇒ Object
- #update_quiz(course_id, id, payload) ⇒ Object
Instance Method Details
#create_quiz(course_id, payload) ⇒ Object
15 16 17 |
# File 'lib/github_to_canvas_quiz/canvas_api/endpoints/quizzes.rb', line 15 def create_quiz(course_id, payload) post("/courses/#{course_id}/quizzes", payload) end |
#get_single_quiz(course_id, id) ⇒ Object
11 12 13 |
# File 'lib/github_to_canvas_quiz/canvas_api/endpoints/quizzes.rb', line 11 def get_single_quiz(course_id, id) get("/courses/#{course_id}/quizzes/#{id}") end |
#list_quizzes(course_id) ⇒ Object
7 8 9 |
# File 'lib/github_to_canvas_quiz/canvas_api/endpoints/quizzes.rb', line 7 def list_quizzes(course_id) get_all("/courses/#{course_id}/quizzes") end |
#update_quiz(course_id, id, payload) ⇒ Object
19 20 21 |
# File 'lib/github_to_canvas_quiz/canvas_api/endpoints/quizzes.rb', line 19 def update_quiz(course_id, id, payload) put("/courses/#{course_id}/quizzes/#{id}", payload) end |