Commit de94b5d3 authored by hupantingxue's avatar hupantingxue

Modify sample document;

parent 5c8f3765
......@@ -34,12 +34,12 @@ Complex audience with iOS & Android specifics
push.notification = jpush.notification(
ios=jpush.ios(
alert="JPush ios test",
badge="+1",
extra={"articleid": "123456"}
badge="1",
extras={"articleid": "123456"}
),
android=jpush.android(
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')
......
......@@ -60,7 +60,7 @@ def ios(alert=None, badge=None, sound=None, content_available=False,
payload['sound'] = 'default'
if content_available:
payload['content-available'] = 1
if extra is not None:
if extras is not None:
payload['extras'] = extras
return payload
......@@ -73,9 +73,8 @@ def android(alert, title=None, builder_id=None, extras=None):
:keyword alert: String alert text.
:keyword title: String
:keyword builder_id: Integer
:keyword delay_while_idle: Boolean
:keyword extra: A set of key/value pairs to include in the push payload
sent to the device. All values must be strings.
:keyword extras: A set of key/value pairs to include in the push payload
sent to the device.
"""
payload = {}
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