lib/bearcat/client/folders.rb in bearcat-1.4.6 vs lib/bearcat/client/folders.rb in bearcat-1.4.7
- old
+ new
@@ -8,35 +8,63 @@
def list_course_folders(course, params = {})
get("/api/v1/courses/#{course}/folders", params)
end
+ def resolve_path_for_course(course, full_path = nil, params)
+ get("/api/v1/courses/#{course}/folders/by_path#{full_path == nil ? "" : "/#{full_path}"}", params)
+ end
+
def create_course_folder(course, params = {})
post("/api/v1/courses/#{course}/folders", params)
end
- def get_user_folder(user, folder, params)
+ def get_user_folder(user, folder, params = {})
get("/api/v1/users/#{user}/folders/#{folder}", params)
end
def list_user_folders(user, params = {})
get("/api/v1/users/#{user}/folders", params)
end
+ def resolve_path_for_user(user, full_path = nil, params = {})
+ get("/api/v1/users/#{user}/folders/by_path#{full_path == nil ? "" : "/#{full_path}"}", params)
+ end
+
def create_user_folder(user, params = {})
post("/api/v1/users/#{user}/folders", params)
end
- def get_group_folder(group, folder, params)
+ def get_group_folder(group, folder, params = {})
get("/api/v1/groups/#{group}/folders/#{folder}", params)
end
def list_group_folders(group, params = {})
get("/api/v1/groups/#{group}/folders", params)
end
+ def resolve_path_for_group(group, full_path = nil, params = {})
+ get("/api/v1/groups/#{group}/folders/by_path#{full_path == nil ? "" : "/#{full_path}"}", params)
+ end
+
def create_group_folder(group, params = {})
post("/api/v1/groups/#{group}/folders", params)
+ end
+
+ def update_folder(folder, params = {})
+ put("/api/v1/folders/#{folder}", params)
+ end
+
+ def delete_folder(folder, params = {})
+ delete("/api/v1/folders/#{folder}", params)
+ end
+
+ def copy_folder(destination_folder, params = {})
+ post("/api/v1/folders/#{destination_folder}/copy_folder", params)
+ end
+
+ def copy_file_to_folder(destination_folder, params = {})
+ post("/api/v1/folders/#{destination_folder}/copy_file", params)
end
end
end
end