Module: Catalogcat::Client::Enrollments

Defined in:
lib/catalogcat/client/enrollments.rb

Instance Method Summary collapse

Instance Method Details

#create_enrollment(params = {}) ⇒ Object



8
9
10
# File 'lib/catalogcat/client/enrollments.rb', line 8

def create_enrollment(params = {})
  post('api/v1/enrollments', params)
end

#delete_enrollment(enrollment) ⇒ Object



20
21
22
# File 'lib/catalogcat/client/enrollments.rb', line 20

def delete_enrollment(enrollment)
  delete("/api/v1/enrollments/#{enrollment}")
end

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



16
17
18
# File 'lib/catalogcat/client/enrollments.rb', line 16

def get_enrollment(id, params = {})
  get("/api/v1/enrollments/#{id}", params)
end

#list_enrollments(page = 1, params = {}) ⇒ Object



4
5
6
# File 'lib/catalogcat/client/enrollments.rb', line 4

def list_enrollments(page = 1, params = {})
  get("/api/v1/enrollments?page=#{page}&per_page=100", params)
end

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



12
13
14
# File 'lib/catalogcat/client/enrollments.rb', line 12

def update_enrollment(id, params = {})
  put("/api/v1/enrollments/#{id}", params)
end