lib/bearcat/client/groups.rb in bearcat-1.4.13 vs lib/bearcat/client/groups.rb in bearcat-1.5.0.beta1

- old
+ new

@@ -1,34 +1,19 @@ module Bearcat class Client < Footrest::Client module Groups + extend ClientModule - def course_groups(course) - get("/api/v1/courses/#{course.to_s}/groups") + prefix "/api/v1/groups/:group/" do + get :group + put :edit_group + delete :delete_group end - def account_groups(account_id) - get("/api/v1/accounts/#{account_id}/groups") - end + get :course_groups, "/api/v1/courses/:course/groups" + get :account_groups, "/api/v1/accounts/:account/groups" - def category_groups(group_category_id) - get("/api/v1/group_categories/#{group_category_id}/groups") - end - - def group(id) - get("/api/v1/groups/#{id}") - end - - def create_group(group_category_id, params={}) - post("/api/v1/group_categories/#{group_category_id}/groups", params) - end - - def edit_group(group_id, params={}) - put("/api/v1/groups/#{group_id}", params) - end - - def delete_group(group_id) - delete("/api/v1/groups/#{group_id}") - end + get :category_groups, "/api/v1/group_categories/:group_category/groups" + post :create_group, "/api/v1/group_categories/:group_category/groups" end end end \ No newline at end of file