@@ -80,7 +80,7 @@ def update_email(self, message_id, topics = None, users = None, targets = None,
80
80
'content-type' : 'application/json' ,
81
81
}, api_params )
82
82
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 ):
84
84
"""Create push notification"""
85
85
86
86
@@ -89,12 +89,6 @@ def create_push(self, message_id, title, body, topics = None, users = None, targ
89
89
if message_id is None :
90
90
raise AppwriteException ('Missing required parameter: "message_id"' )
91
91
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
-
98
92
99
93
api_params ['messageId' ] = message_id
100
94
api_params ['title' ] = title
@@ -112,12 +106,15 @@ def create_push(self, message_id, title, body, topics = None, users = None, targ
112
106
api_params ['badge' ] = badge
113
107
api_params ['draft' ] = draft
114
108
api_params ['scheduledAt' ] = scheduled_at
109
+ api_params ['contentAvailable' ] = content_available
110
+ api_params ['critical' ] = critical
111
+ api_params ['priority' ] = priority
115
112
116
113
return self .client .call ('post' , api_path , {
117
114
'content-type' : 'application/json' ,
118
115
}, api_params )
119
116
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 ):
121
118
"""Update push notification"""
122
119
123
120
@@ -143,6 +140,9 @@ def update_push(self, message_id, topics = None, users = None, targets = None, t
143
140
api_params ['badge' ] = badge
144
141
api_params ['draft' ] = draft
145
142
api_params ['scheduledAt' ] = scheduled_at
143
+ api_params ['contentAvailable' ] = content_available
144
+ api_params ['critical' ] = critical
145
+ api_params ['priority' ] = priority
146
146
147
147
return self .client .call ('patch' , api_path , {
148
148
'content-type' : 'application/json' ,
0 commit comments