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
2fbc680c
Commit
2fbc680c
authored
Dec 04, 2013
by
linbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. Fix username issue 2. Keep client version accordance with API version
parent
b15642a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
+3
-6
example.py
examples/example.py
+1
-2
__init__.py
jpush/__init__.py
+1
-1
client.py
jpush/client.py
+1
-3
No files found.
examples/example.py
View file @
2fbc680c
...
...
@@ -6,11 +6,10 @@ from jpush import JPushClient
sendno
=
int
(
time
.
time
())
username
=
'username'
app_key
=
'appkey'
master_secret
=
'master_secret'
jpush_client
=
JPushClient
(
username
,
master_secret
)
jpush_client
=
JPushClient
(
master_secret
)
# Send message by tag
jpush_client
.
send_notification_by_tag
(
'tagapi'
,
app_key
,
sendno
,
'des'
,
...
...
jpush/__init__.py
View file @
2fbc680c
from
.client
import
JPushClient
__version__
=
'
0.1.2
'
__version__
=
'
2.0.0
'
VERSION
=
tuple
(
map
(
int
,
__version__
.
split
(
'.'
)))
__all__
=
[
'JPushClient'
]
jpush/client.py
View file @
2fbc680c
...
...
@@ -21,15 +21,13 @@ KEY_PARAMS = [
class
JPushClient
:
"""JPush Python Client Class"""
def
__init__
(
self
,
username
,
master_secret
,
callback_url
=
""
):
self
.
username
=
username
def
__init__
(
self
,
master_secret
,
callback_url
=
""
):
self
.
master_secret
=
master_secret
self
.
callback_url
=
callback_url
def
_gen_params
(
self
,
kargs
):
"""Generate Post params"""
params
=
{}
params
[
"username"
]
=
self
.
username
params
[
"callback_url"
]
=
self
.
callback_url
for
k
in
KEY_PARAMS
:
params
[
k
]
=
kargs
.
get
(
k
)
...
...
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