Send CSV files
New function: CanvasClient.sendSis(endpoint, filePath, parameters)
Now, it is possible to send CSV files through the API by indicating the Canvas endpoint to send the file and the path of such file. Extra parameters can be sent as well. The request is going to be a POST with a content-type: multipart/form-data
header.
Minor changes
New way of debugging. Deprecation of log
parameter
- New recommended way for getting detailed logs: set an environmental variable
DEBUG=*
orDEBUG=canvas-api
. Passinglog
(function) as parameter in Canvas constructor is now deprecated.
Deprecations and more descriptive messages:
CanvasClient.requestUrl(endpoint, method)
is deprecated forGET
requests. Users should use.get()
,.list()
and.listPaginated()
. For retro-compatibility reasons, the default value of parametermethod
is kept toGET
even being this value the deprecated one.CanvasClient.list(endpoint)
throws more descriptive error if theendpoint
doesn't return an array of items. Users should useget()
for getting single resources instead of lists of them.
TypeScript and ECMAScript modules ready (experimental)
-
The package includes an ECMAScript module version of it under the path
/esm
ready to be imported. The same path includes types for its usage from TypeScript:import Canvas from '@kth/canvas-api/esm'
Note that this feature is experimental and the path
/esm
can change in the future