Files API

This page documents the Files API of Canvas, see https://canvas.instructure.com/doc/api/files for details.


Canvas.foldersFunction
Canvas.folders(f::Folder; kwargs...) -> Vector{Folder}, page_data

Return a paginated list of folders in the specified folder. Return a vector of Folders and a dictionary with page data.

Canvas API documentation: List folders (GET /api/v1/folders/:id/folders)

Canvas.folders(co::Union{Course,Group,User}; kwargs...) -> Vector{Folder}, page_data

Return a paginated, flattened, list of all folders in the course/group/user. Return a vector of Folders and a dictionary with page data.

Canvas API documentation: List all folders (GET /api/v1/courses/:course_id/folders, GET /api/v1/groups/:group_id/folders, GET /api/v1/users/:user_id/folders)

Canvas.download_fileFunction
Canvas.download_file(f::File, local_path=mktempdir(); update_period=Inf, kwargs...)

Download the File. If local_path is a directory the file will be placed in this directory with the upstream filename. If local_path is a file path the file will be downloaded to that path directly, ignoring the upstream filename.