Commit de94b5d3 authored by hupantingxue's avatar hupantingxue

Modify sample document;

parent 5c8f3765
...@@ -34,12 +34,12 @@ Complex audience with iOS & Android specifics ...@@ -34,12 +34,12 @@ Complex audience with iOS & Android specifics
push.notification = jpush.notification( push.notification = jpush.notification(
ios=jpush.ios( ios=jpush.ios(
alert="JPush ios test", alert="JPush ios test",
badge="+1", badge="1",
extra={"articleid": "123456"} extras={"articleid": "123456"}
), ),
android=jpush.android( android=jpush.android(
alert="Breaking Special Android News!", alert="Breaking Special Android News!",
extra={"articleid": "http://m.example.com/123456"} extras={"articleid": "http://m.example.com/123456"}
) )
) )
push.platform = jpush.platform('ios', 'android') push.platform = jpush.platform('ios', 'android')
......
...@@ -60,7 +60,7 @@ def ios(alert=None, badge=None, sound=None, content_available=False, ...@@ -60,7 +60,7 @@ def ios(alert=None, badge=None, sound=None, content_available=False,
payload['sound'] = 'default' payload['sound'] = 'default'
if content_available: if content_available:
payload['content-available'] = 1 payload['content-available'] = 1
if extra is not None: if extras is not None:
payload['extras'] = extras payload['extras'] = extras
return payload return payload
...@@ -73,9 +73,8 @@ def android(alert, title=None, builder_id=None, extras=None): ...@@ -73,9 +73,8 @@ def android(alert, title=None, builder_id=None, extras=None):
:keyword alert: String alert text. :keyword alert: String alert text.
:keyword title: String :keyword title: String
:keyword builder_id: Integer :keyword builder_id: Integer
:keyword delay_while_idle: Boolean :keyword extras: A set of key/value pairs to include in the push payload
:keyword extra: A set of key/value pairs to include in the push payload sent to the device.
sent to the device. All values must be strings.
""" """
payload = {} payload = {}
if alert is not None: if alert is not None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment