Releases: ucfopen/canvasapi
Releases · ucfopen/canvasapi
0.15.0 - 2019-11-19
New Endpoint Coverage
- Assignment Extensions (Thanks, @ljoks)
- AssignmentGroup (Thanks, @ctcuff)
- List Assignments
- Authentications Log (Thanks, @weining-li)
- Brand Configs (Thanks, @bennettscience)
- Comm Messages (Thanks, @ljoks)
- File Usage Rights (Thanks, @atarisafari and @joonro)
- Gradebook History (Thanks, @gdijkhoffz)
- Quiz Reports (Thanks, @atarisafari
- Quiz Submission Events (Thanks, @Goff-Davis)
- Quiz Submission User List (Thanks, @gdijkhoffz)
- Rubric Associations (Thanks, @weining-li)
General
- Throw
IndexError
when using negative indexes onPaginatedList
objects (Thanks, @UniversalSuperBox) Assignment.overrides
now returns a list ofAssignmentOverride
objects.
Deprecation Warnings
CanvasObject.attributes
is now deprecated and will be removed in a future version.CanvasObject.to_json()
is now deprecated and will be removed in a future version. To view the original attributes sent by Canvas, enable logs from the requests library.
Bugfixes
- Fixed an issue where
util.clean_headers()
would throw aValueError
if a user accidentally included a space in their API token. (Thanks, @keeeeeegan) - Fixed an issue where
QuizSubmission
objects sometimes wouldn't have a course_id, making some methods unusable. (Thanks, @bennettscience) - Fixed an issue where
get_user()
did not accept arbitrary keyword arguments (Thanks, @eriktews) - Fixed an issue where an import was triggering a
DeprecationWarning
(Thanks, @Screeeech) - Fixed an issue where a GroupedSubmission wasn't saving the
submissions
attribute properly
0.14.0 - 2019-08-20
New Endpoint Coverage
- API Token scopes (Thanks, @jrsilveti)
- List scopes
- Account Notifications (Thanks, @jrsilveti)
- Show a global notification
- Update a global notification
- Account Reports (Thanks, @jrsilveti)
- Start a report
- Status of a report
- Delete a report
- Collaborations (Thanks, @jrsilveti)
- List collaborations
- List members of a collaboration
- Feature Flags (Thanks, @cat0698)
- List features
- List enabled features
- Get feature flag
- Set feature flag
- Remove feature flag
- Rubric (Thanks, @cat0698)
- Create a single rubric
General
- Removed overzealous global enabling of
DeprecationWarning
. (Thanks, @Screeeech)- Note:
DeprecationWarnings
are disabled by default, so you may need to run your code withpython -Wd
to see them.
- Note:
0.13.0 - 2019-07-08
New Endpoint Coverage
- Content Exports (Thanks, @weining-li)
- ePub Exports (Thanks, @jrsilveti)
- Favorites (Thanks, @atarisafari)
- Grading Periods (Thanks, @jrsilveti)
- Outcome Import (Thanks, @jrsilveti)
- Peer Reviews (Thanks, @vutoan1245)
- Planner (Thanks, @weining-li)
- Planner
- Planner Notes
- Planner Overrides
- Polls (Thanks, @Goff-Davis)
- Poll
- PollChoice
- PollSession
- PollSubmission
- Quiz Submission Questions (Thanks, @bradfordlynch)
General
- Added documentation for Debugging
- Added request and response logging to
Requester.request
- Added documentation for Exceptions
- Added generic error handling for unhandled 4XX+ HTTP errors
- Added Code of Conduct
- Added support for PATCH methods (Thanks, @us91)
- Added a warning when using a blank
CANVAS_URL
(Thanks, @gdijkhoffz) - Added Issue and Pull Request Templates
- Added CODEOWNERS file
Deprecation Warnings
Quiz.get_all_quiz_submissions
is now deprecated. UseQuiz.get_submissions
instead.
Bugfixes
- Fixed an issue where creating an external tool did not properly send parameters to Canvas. (Thanks, @altgilbers)
- Fixed an issue where getting Quiz Submissions would only return up to the first 10 results (Thanks,@Mike-Nahmias)
- Fixed an issue where unhandled 4XX and 5XX HTTP errors would cause a JSONDecodeError
- Removed a limitation where the parameter
grouped
being passed toget_multiple_submissions
would be ignored. These methods now return aGroupedSubmission
object containing multipleSubmission
objects, instead of ignoring. (Thanks, @bennettscience)
0.12.0 - 2019-04-03
New Endpoint Coverage
- Assignment Overrides
- Quiz Submissions (Thanks, @wallacetyler)
- Blueprints (Thanks, @gdijkhoffz)
- Create an Admin (Thanks, @altgilbers)
- SIS Imports (Thanks, @nottheswimmer)
- Create and Delete Communication Channels (Thanks, @matthewf-ucsd)
General
- Added support for HTTP response 409 (Thanks, @wallacetyler)
Bugfixes
- Fixed an issue where
Section.edit()
didn't accept keyword arguments (Thanks, @wjw27)
0.11.0 - 2018-09-17
New Endpoint Coverage
- Get all quiz submissions (Thanks, @petarGitNik)
- Upload a file to a submission (Thanks, @MarkLalor)
- Upload a file to a folder (Thanks, @elec3647)
- Get Admins in an account (Thanks, @kensler)
General
- Added support for Python 3.7
- Added a warning when using HTTP for the base url instead of HTTPS. This should help prevent some confusing behavior that Canvas exhibits when making HTTP requests to an HTTPS-enabled instance.
- Added more detailed documentation for passing complex parameters as keyword arguments.
Bugfixes
- Fixed an issue where
Outcome.get_subgroups()
didn't have sufficient context to call other methods. - Fixed improper passing of keyword arguments when editing a Module (Thanks, @phaustin)
0.10.0 - 2018-06-01
New Endpoint Coverage
- Content Migrations (Thanks, @qwertynerd97)
- Copy a File (Thanks, @qwertynerd97)
- Course Quiz Extensions
- List Announcements (Thanks, @rmanbaird)
- Grade/Comment on Multiple Submissions (Thanks, @rmanbaird)
- Quiz Extensions
General
- Lots of docstring fixes. (Thanks, @rmanbaird)
Deprecation Warnings
- All methods starting with
list_
have been deprecated. Each has been replaced with a corresponding method starting withget_
. For example,Course.list_groups()
is nowCourse.get_groups()
. Thelist_
methods will be removed in a future release. (Thanks @qwertynerd97 for doing the bulk of the grunt work.) Course.update_tab()
is now deprecated. UseTab.update()
instead.
Bugfixes
- Fixed a bug where taking a slice of a
PaginatedList
where thestart
was larger than the list caused an infinite loop. - Fixed a typo that prevented
Assignment.submit()
from working properly. (Thanks, @Tobiaqs)
0.9.0 - 2018-03-01
New Endpoint Coverage
- Quiz Questions
General
- Added example usage for several common endpoints to our documentation.
- Updated
PaginatedList
to allow specification of the root element to build the list from when given an atypical JSON response (see #146). (thanks @dfwarden) - Improved keyword argument support for
course.get_section()
(thanks @andrew-gardener) - When uploading a file to a submission with
Submission.upload_comment
, it will automatically attached to a new comment.
Deprecation Warnings
⚠️ Dropped support for Python 3.3⚠️ - Python 3.3 is end-of-life as of September 2017
- Should continue to function in 3.3, but compatibility cannot be guaranteed going forward.
- Several methods in the
Course
andSection
classes relating to assignments and submissions have been deprecated.- Comparable methods have been implemented in the
Assignment
andSubmission
classes, as appropriate. - The deprecated methods now include a warning in the documentation with reference to the replacement. Additionally, the deprecated methods will raise a
DeprecationWarning
. - These methods will be removed in a future release.
- Comparable methods have been implemented in the
Course.list_sections()
has been deprecated. UseCourse.get_sections()
instead.
Bugfixes
- Fixed an issue where booleans would be capitalized when sent to Canvas, causing Canvas to misinterpret them and set default values.
- Fixed an issue where unexpected JSON responses from Canvas would cause
PaginatedList
objects to fail.
0.8.2 - 2018-01-24
Bugfixes
- Fixed an issue where editing and deleting user logins would use incorrect IDs.
0.8.1 - 2018-01-23
General
- Fixed several incorrect and missing docstrings
Bugfixes
- Fixed an issue where Canvas returning
while(1);
at the beginning of a response to uploading a file prevented uploads from completing. - Fixed an issue where a trailing slash in the provided BASE_URL would cause
PaginatedList
objects to fail. - Fixed an issue where combine_kwargs was transposing empty brackets and keys when a dictionary had a list as a value.
0.8.0 - 2018-01-04
New Endpoint Coverage
- Account
- Delete a sub account
- Grading Standards (Thanks, @JonGuilbe)
- Notification Preferences (Thanks, @a-goetz)
- Update a preference
- Update preferences by category
- Update multiple preferences
- Outcomes (Thanks, @a-goetz)
- Quiz Question Groups (Thanks, @JonGuilbe)
- Rubric (Thanks, @sigurdurb)
General
- Added support for other iterables as parameter values. (Thanks, @liblit)
- For many endpoints that accept an "object id", either a CanvasAPI Object or integer ID can now be passed. (Thanks, @a-goetz)
- Added a requester cache that rememebers the last 5 requests to Canvas. It can be accessed as the attribute
_cache
of therequester object
. (e.g.course._requester._cache
) - Files can now be downloaded directly from the
File
object in one of two ways: (Thanks, @DanBrink91)get_contents
will directly return the contents of the file. (e.g.file.get_contents()
)download
will download the file and save it to the provided path. (e.g.file.download('example.txt')
)
- Moved several methods exclusive to the API Key owner's user from the
User
class to a new class calledCurrentUser
. There is a new method in theCanvas
class calledget_current_user
to access this object. (e.g.canvas.get_current_user()
) (Thanks, @DanBrink91)
Bugfixes
- Fixed a bug where creating conversations wouldn't work until the user iterated over the response.
- Lots of formatting fixes and spelling corrections.
Deprecation Warning
Including /api/v1/
at the end of the API URL passed to a new Canvas
object is now deprecated. Users should now only pass the root URL into the Canvas
object (e.g. "https://example.com/api/v1/"
should now be "https://example.com"
).
For now, users including /api/v1/
will see a DeprecationWarning
, but things will otherwise operate normally. The ability to continue using /api/v1/
will be removed in a future release.