@@ -424,6 +424,7 @@ class ApsAlert(object):
424424 Args:
425425 title: Title of the alert (optional). If specified, overrides the title set via
426426 ``messaging.Notification``.
427+ subtitle: Subtitle of the alert (optional).
427428 body: Body of the alert (optional). If specified, overrides the body set via
428429 ``messaging.Notification``.
429430 loc_key: Key of the body string in the app's string resources to use to localize the
@@ -439,9 +440,10 @@ class ApsAlert(object):
439440 launch_image: Image for the notification action (optional).
440441 """
441442
442- def __init__ (self , title = None , body = None , loc_key = None , loc_args = None , title_loc_key = None ,
443- title_loc_args = None , action_loc_key = None , launch_image = None ):
443+ def __init__ (self , title = None , subtitle = None , body = None , loc_key = None , loc_args = None ,
444+ title_loc_key = None , title_loc_args = None , action_loc_key = None , launch_image = None ):
444445 self .title = title
446+ self .subtitle = subtitle
445447 self .body = body
446448 self .loc_key = loc_key
447449 self .loc_args = loc_args
@@ -765,6 +767,7 @@ def encode_aps_alert(cls, alert):
765767 raise ValueError ('Aps.alert must be a string or an instance of ApsAlert class.' )
766768 result = {
767769 'title' : _Validators .check_string ('ApsAlert.title' , alert .title ),
770+ 'subtitle' : _Validators .check_string ('ApsAlert.subtitle' , alert .subtitle ),
768771 'body' : _Validators .check_string ('ApsAlert.body' , alert .body ),
769772 'title-loc-key' : _Validators .check_string (
770773 'ApsAlert.title_loc_key' , alert .title_loc_key ),
0 commit comments