@@ -80,7 +80,7 @@ def update_email(self, message_id, topics = None, users = None, targets = None,
8080 'content-type' : 'application/json' ,
8181 }, api_params )
8282
83- def create_push (self , message_id , title , body , topics = None , users = None , targets = None , data = None , action = None , image = None , icon = None , sound = None , color = None , tag = None , badge = None , draft = None , scheduled_at = None ):
83+ def create_push (self , message_id , title = None , body = None , topics = None , users = None , targets = None , data = None , action = None , image = None , icon = None , sound = None , color = None , tag = None , badge = None , draft = None , scheduled_at = None , content_available = None , critical = None , priority = None ):
8484 """Create push notification"""
8585
8686
@@ -89,12 +89,6 @@ def create_push(self, message_id, title, body, topics = None, users = None, targ
8989 if message_id is None :
9090 raise AppwriteException ('Missing required parameter: "message_id"' )
9191
92- if title is None :
93- raise AppwriteException ('Missing required parameter: "title"' )
94-
95- if body is None :
96- raise AppwriteException ('Missing required parameter: "body"' )
97-
9892
9993 api_params ['messageId' ] = message_id
10094 api_params ['title' ] = title
@@ -112,12 +106,15 @@ def create_push(self, message_id, title, body, topics = None, users = None, targ
112106 api_params ['badge' ] = badge
113107 api_params ['draft' ] = draft
114108 api_params ['scheduledAt' ] = scheduled_at
109+ api_params ['contentAvailable' ] = content_available
110+ api_params ['critical' ] = critical
111+ api_params ['priority' ] = priority
115112
116113 return self .client .call ('post' , api_path , {
117114 'content-type' : 'application/json' ,
118115 }, api_params )
119116
120- def update_push (self , message_id , topics = None , users = None , targets = None , title = None , body = None , data = None , action = None , image = None , icon = None , sound = None , color = None , tag = None , badge = None , draft = None , scheduled_at = None ):
117+ def update_push (self , message_id , topics = None , users = None , targets = None , title = None , body = None , data = None , action = None , image = None , icon = None , sound = None , color = None , tag = None , badge = None , draft = None , scheduled_at = None , content_available = None , critical = None , priority = None ):
121118 """Update push notification"""
122119
123120
@@ -143,6 +140,9 @@ def update_push(self, message_id, topics = None, users = None, targets = None, t
143140 api_params ['badge' ] = badge
144141 api_params ['draft' ] = draft
145142 api_params ['scheduledAt' ] = scheduled_at
143+ api_params ['contentAvailable' ] = content_available
144+ api_params ['critical' ] = critical
145+ api_params ['priority' ] = priority
146146
147147 return self .client .call ('patch' , api_path , {
148148 'content-type' : 'application/json' ,
0 commit comments