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
b6969409
Commit
b6969409
authored
Apr 05, 2017
by
fendouai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
2439f431
3ff2934f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
conf.py
examples/push_examples/conf.py
+1
-1
example_all.py
examples/push_examples/example_all.py
+2
-3
common.py
jpush/common.py
+1
-1
No files found.
examples/push_examples/conf.py
View file @
b6969409
# please put your app_key and master_secret here
# please put your app_key and master_secret here
app_key
=
u'6be9204c30b9473e87bad4dc'
app_key
=
u'6be9204c30b9473e87bad4dc'
master_secret
=
u'a
564b268ba23631a8a34e687
'
master_secret
=
u'a
19bef7870c55d7e51f4c4f0
'
examples/push_examples/example_all.py
View file @
b6969409
...
@@ -9,7 +9,7 @@ push = _jpush.create_push()
...
@@ -9,7 +9,7 @@ push = _jpush.create_push()
# the default logging level is WARNING,if you set the logging level to "DEBUG",the it will show the debug logging
# the default logging level is WARNING,if you set the logging level to "DEBUG",the it will show the debug logging
_jpush
.
set_logging
(
"DEBUG"
)
_jpush
.
set_logging
(
"DEBUG"
)
push
.
audience
=
jpush
.
all_
push
.
audience
=
jpush
.
all_
push
.
notification
=
jpush
.
notification
(
alert
=
"hello python jpush api"
)
push
.
notification
=
jpush
.
notification
(
alert
=
"
!
hello python jpush api"
)
push
.
platform
=
jpush
.
all_
push
.
platform
=
jpush
.
all_
try
:
try
:
response
=
push
.
send
()
response
=
push
.
send
()
...
@@ -20,4 +20,4 @@ except common.APIConnectionException:
...
@@ -20,4 +20,4 @@ except common.APIConnectionException:
except
common
.
JPushFailure
:
except
common
.
JPushFailure
:
print
(
"JPushFailure"
)
print
(
"JPushFailure"
)
except
:
except
:
print
(
"Exception"
)
print
(
"Exception"
)
\ No newline at end of file
jpush/common.py
View file @
b6969409
...
@@ -2,7 +2,7 @@ import json
...
@@ -2,7 +2,7 @@ import json
import
logging
import
logging
import
requests
import
requests
BASE_URL
=
"https://api.jpush.cn/"
BASE_URL
=
"
https://api.jpush.cn/"
PUSH_URL
=
BASE_URL
+
'v3/push'
PUSH_URL
=
BASE_URL
+
'v3/push'
VALIDATE_PUSH_URL
=
BASE_URL
+
'v3/push/validate'
VALIDATE_PUSH_URL
=
BASE_URL
+
'v3/push/validate'
...
...
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