Version 2.0.0a1
Pre-release
Pre-release
Breaking Changes
Events.get_events(...)now returns a list ofEventinstances rather than a list ofdict
representing events.Eventinherits fromMappingbut will not have all the same capabilities as
dict.- Your code is affected if you use
Events.get_events(...)and expect a list ofdictrather than a list of
Mapping. For example, if you use__setitem__(event['key'] = value),update(),copy(), or
if your code depends on thestrorreprof theEvent. Use of__getitem__(event['key']),
get(), and otherMappingmethods is unaffected. See
https://docs.python.org/2.7/library/collections.html#collections-abstract-base-classes for methods supported on
Mappinginstances. - Migration: If you still need to treat an
Eventas adict, you can get a deepcopy of the originaldict
using the new property onBaseAPIJSONObject,response_object.
- Your code is affected if you use
Features
- Added ability to create custom subclasses of SDK objects with
_item_typedefined. - Added an
Eventclass.
Other
- Added extra information to
BoxAPIException. - Added
collaboration()method toClient. - Reworked the class hierarchy. Previously,
BaseEndpointwas the parent ofBaseObjectwhich was the parent
of all smart objects. NowBaseObjectis a child of bothBaseEndpointandBaseAPIJSONObject.
BaseObjectis the parent of all objects that are a part of the REST API. Another subclass of
BaseAPIJSONObject,APIJSONObject, was created to represent pseudo-smart objects such asEventthat are not
directly accessible through an API endpoint.