api: Implement PATCH /settings/notifications.

This commit is contained in:
Yago González 2018-08-10 01:46:00 +02:00 committed by Tim Abbott
parent 330fc4783e
commit c6b123016e

View file

@ -1125,6 +1125,23 @@ class Client(object):
request={'subscription_data': subscription_data} request={'subscription_data': subscription_data}
) )
def update_notification_settings(self, notification_settings):
# type: (Dict[str, Any]) -> Dict[str, Any]
'''
Example usage:
>>> client.update_notification_settings({
'enable_stream_push_notifications': True,
'enable_offline_push_notifications': False,
})
{'enable_offline_push_notifications': False, 'enable_stream_push_notifications': True, 'msg': '', 'result': 'success'}
'''
return self.call_endpoint(
url='settings/notifications',
method='PATCH',
request=notification_settings,
)
def get_stream_id(self, stream): def get_stream_id(self, stream):
# type: (str) -> Dict[str, Any] # type: (str) -> Dict[str, Any]
''' '''