Updated SparkData Classes & Fixed and Improved Rate-Limit Handling
In addition to fixing a bug ( #52 ) in the automated rate-limit handling and several testing improvements, this release also includes some substantial enhancements to the SparkData classes and how objects are created and returned by the API methods. 😎
New Features:
SparkData
classes (Room
,Person
,Message
, etc.) are now composed classes created by inheriting from theSparkData
base class and type-specific mixin classes. This makes it easier to create your own composed classes (like we are doing with the enhanced data objects in theciscosparksdk
package).- The
CiscoSparkAPI
class now accepts anobject_factory=
parameter that not surprisingly accepts an object factory function, which is responsible for creating the objects returned by the API methods. This allows you to easily create your own object classes and have them returned by theCiscoSparkAPI
methods. #EasilyExtensible 🔌 - Automated rate-limit handling now generates a custom
SparkRateLimitWarning
⚠️ warning message when a rate-limit response is received. If you want to know if your code is being rate-limited, you can easily catch and log warnings to see 🙈 what is going on.
Updated feature docs on the new object extensibility are coming soon. I wanted to go ahead and get the rate-limit fixes, and the initial object code out so the development can move forward on the ciscosparksdk package.
Happy Coding!