This version is a major rewrite of the library and adds support for the full REST API, including Notifications, Subscriptions, Projects and Senders.
This version has some breaking changes:
notification.deliver_toandnotification.broadcastwere removed. Instead you should useclient.notifications.create()(or thesend()alias).- When you call
client.notifications.create(), you cannot pass aprojectobject as an argument, like in the previous version, but you can pass an optionalproject_idargument (however in most cases you don't need to set theproject_idargument, because you already set it on the client instance). - When you call
client.notifications.create(), for the fields that expect multiple items (likeactions,custom_metrics,uidsandtags), you should use alist(e.g. usetags=["tag1", "tag2"]instead oftags=("tag1", "tag2")). - When you call
client.notifications.create()with thesend_atargument, you should pass a ISO 8601 string (and not adatetimeobject like in the previous version). For example, you can use(datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(seconds=60)).isoformat()to send a notification after 60 seconds. - When you call
client.notifications.create(), an object is returned as a result (previous version returned adict). The fields returned remain the same (e.g. useresult.idinstead ofresult["id"]).