Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jpush-api-python-client
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
jpush-api-python-client
Commits
3ff2934f
Commit
3ff2934f
authored
Apr 05, 2017
by
fendouai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add alert_type
parent
7c7a5fe3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
example_notification.py
examples/push_examples/example_notification.py
+1
-1
__init__.py
jpush/__init__.py
+1
-1
payload.py
jpush/push/payload.py
+3
-1
No files found.
examples/push_examples/example_notification.py
View file @
3ff2934f
...
...
@@ -10,7 +10,7 @@ push.audience = jpush.all_
push
.
platform
=
jpush
.
all_
ios
=
jpush
.
ios
(
alert
=
"Hello, IOS JPush!"
,
sound
=
"a.caf"
,
extras
=
{
'k1'
:
'v1'
})
android
=
jpush
.
android
(
alert
=
"Hello, Android msg"
,
priority
=
1
,
style
=
1
,
big_text
=
'jjjjjjjjjj'
,
extras
=
{
'k1'
:
'v1'
})
android
=
jpush
.
android
(
alert
=
"Hello, Android msg"
,
priority
=
1
,
style
=
1
,
alert_type
=
1
,
big_text
=
'jjjjjjjjjj'
,
extras
=
{
'k1'
:
'v1'
})
push
.
notification
=
jpush
.
notification
(
alert
=
"Hello, JPush!"
,
android
=
android
,
ios
=
ios
)
...
...
jpush/__init__.py
View file @
3ff2934f
...
...
@@ -71,7 +71,7 @@ __all__ = [
schedulepayload
,
]
__version__
=
'3.2.
4
'
__version__
=
'3.2.
5
'
VERSION
=
tuple
(
map
(
int
,
__version__
.
split
(
'.'
)))
# Silence urllib3 INFO logging by default
...
...
jpush/push/payload.py
View file @
3ff2934f
...
...
@@ -77,7 +77,7 @@ def ios(alert=None, badge='+1', sound=None, content_available=False,
return
payload
def
android
(
alert
,
title
=
None
,
builder_id
=
None
,
extras
=
None
,
priority
=
None
,
category
=
None
,
style
=
None
,
big_text
=
None
,
inbox
=
None
,
big_pic_path
=
None
):
priority
=
None
,
category
=
None
,
style
=
None
,
alert_type
=
None
,
big_text
=
None
,
inbox
=
None
,
big_pic_path
=
None
):
"""Android specific platform override payload.
:keyword alert: String alert text.If you set alert to a empty string,then the payload
...
...
@@ -102,6 +102,8 @@ def android(alert, title=None, builder_id=None, extras=None,
payload
[
'category'
]
=
category
if
style
is
not
None
:
payload
[
'style'
]
=
style
if
alert_type
is
not
None
:
payload
[
'alert_type'
]
=
alert_type
if
big_text
is
not
None
:
payload
[
'big_text'
]
=
big_text
if
inbox
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment