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
eef88eb0
Commit
eef88eb0
authored
Apr 20, 2016
by
fendouai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sms_message when it is none
parent
32689984
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
conf.py
examples/device/conf.py
+1
-1
conf.py
examples/push/conf.py
+1
-1
example_audience.py
examples/push/example_audience.py
+2
-1
core.py
jpush/push/core.py
+2
-1
No files found.
examples/device/conf.py
View file @
eef88eb0
app_key
=
u'6be9204c30b9473e87bad4dc'
master_secret
=
u'
8aae478411e89f7682ed5af6
'
master_secret
=
u'
9349ad7c90292a603c512e92
'
examples/push/conf.py
View file @
eef88eb0
app_key
=
u'6be9204c30b9473e87bad4dc'
master_secret
=
u'
8aae478411e89f7682ed5af6
'
master_secret
=
u'
9349ad7c90292a603c512e92
'
examples/push/example_audience.py
View file @
eef88eb0
...
...
@@ -7,6 +7,7 @@ push.audience = jpush.audience(
jpush
.
tag
(
"tag1"
,
"tag2"
),
jpush
.
alias
(
"alias1"
,
"alias2"
)
)
push
.
notification
=
jpush
.
notification
(
alert
=
"Hello
,
world with audience!"
)
push
.
notification
=
jpush
.
notification
(
alert
=
"Hello world with audience!"
)
push
.
platform
=
jpush
.
all_
print
push
.
payload
push
.
send
()
jpush/push/core.py
View file @
eef88eb0
...
...
@@ -22,12 +22,13 @@ class Push(object):
data
=
{
"audience"
:
self
.
audience
,
"platform"
:
self
.
platform
,
"sms_message"
:
self
.
smsmessage
,
}
if
(
self
.
notification
is
None
)
and
(
self
.
message
is
None
):
raise
ValueError
(
"Notification and message cannot be both empty"
)
if
self
.
notification
is
not
None
:
data
[
'notification'
]
=
self
.
notification
if
self
.
smsmessage
is
not
None
:
data
[
'sms_message'
]
=
self
.
sms_message
if
self
.
options
is
not
None
:
data
[
'options'
]
=
self
.
options
if
self
.
message
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