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
b15642a2
Commit
b15642a2
authored
Oct 24, 2013
by
linbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix extra parameters issue
parent
0cc27c96
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
__init__.py
jpush/__init__.py
+1
-1
client.py
jpush/client.py
+3
-1
No files found.
jpush/__init__.py
View file @
b15642a2
from
.client
import
JPushClient
from
.client
import
JPushClient
__version__
=
'0.1.
1
'
__version__
=
'0.1.
2
'
VERSION
=
tuple
(
map
(
int
,
__version__
.
split
(
'.'
)))
VERSION
=
tuple
(
map
(
int
,
__version__
.
split
(
'.'
)))
__all__
=
[
'JPushClient'
]
__all__
=
[
'JPushClient'
]
jpush/client.py
View file @
b15642a2
...
@@ -37,13 +37,15 @@ class JPushClient:
...
@@ -37,13 +37,15 @@ class JPushClient:
def
_gen_content
(
self
,
msg_title
,
msg_content
,
msg_type
,
extras
):
def
_gen_content
(
self
,
msg_title
,
msg_content
,
msg_type
,
extras
):
"""Generate message content"""
"""Generate message content"""
content
=
{
"extras"
:
extras
}
content
=
{}
if
msg_type
==
1
:
# notification
if
msg_type
==
1
:
# notification
content
[
"n_title"
]
=
msg_title
content
[
"n_title"
]
=
msg_title
content
[
"n_content"
]
=
msg_content
content
[
"n_content"
]
=
msg_content
content
[
"n_extras"
]
=
extras
else
:
# custom message
else
:
# custom message
content
[
"title"
]
=
msg_title
content
[
"title"
]
=
msg_title
content
[
"message"
]
=
msg_content
content
[
"message"
]
=
msg_content
content
[
"extras"
]
=
extras
return
json
.
dumps
(
content
,
separators
=
(
','
,
':'
))
return
json
.
dumps
(
content
,
separators
=
(
','
,
':'
))
def
_gen_verification_code
(
self
,
sendno
,
receiver_type
,
receiver_value
):
def
_gen_verification_code
(
self
,
sendno
,
receiver_type
,
receiver_value
):
...
...
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