Module: Catalogcat::Client::Courses
- Defined in:
- lib/catalogcat/client/courses.rb
Instance Method Summary collapse
- #create_course(params = {}) ⇒ Object
- #delete_course(course) ⇒ Object
- #get_course(id, params = {}) ⇒ Object
- #list_courses(page = 1, params = {}) ⇒ Object
- #update_course(id, params = {}) ⇒ Object
Instance Method Details
#create_course(params = {}) ⇒ Object
8 9 10 |
# File 'lib/catalogcat/client/courses.rb', line 8 def create_course(params = {}) post('/api/v1/courses', params) end |
#delete_course(course) ⇒ Object
20 21 22 |
# File 'lib/catalogcat/client/courses.rb', line 20 def delete_course(course) delete("/api/v1/courses/#{course}") end |
#get_course(id, params = {}) ⇒ Object
16 17 18 |
# File 'lib/catalogcat/client/courses.rb', line 16 def get_course(id, params = {}) get("/api/v1/courses/#{id}", params) end |
#list_courses(page = 1, params = {}) ⇒ Object
4 5 6 |
# File 'lib/catalogcat/client/courses.rb', line 4 def list_courses(page = 1, params = {}) get("/api/v1/courses?page=#{page}&per_page=100", params) end |
#update_course(id, params = {}) ⇒ Object
12 13 14 |
# File 'lib/catalogcat/client/courses.rb', line 12 def update_course(id, params = {}) put("/api/v1/courses/#{id}", params) end |