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
da2ce84d
Commit
da2ce84d
authored
Nov 30, 2018
by
Helperhaps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add status message api
parent
5c624eef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
report_example.py
examples/report_example.py
+3
-0
__init__.py
jpush/__init__.py
+1
-1
core.py
jpush/report/core.py
+13
-0
No files found.
examples/report_example.py
View file @
da2ce84d
...
...
@@ -12,3 +12,6 @@ def receivede():
def
users
():
report
.
get_users
(
"DAY"
,
"2016-04-10"
,
"3"
)
def
status
():
report
.
get_status_messages
(
'3289406737'
,
[
'xxx'
])
jpush/__init__.py
View file @
da2ce84d
...
...
@@ -75,7 +75,7 @@ __all__ = [
schedulepayload
,
]
__version__
=
'3.3.
3
'
__version__
=
'3.3.
4
'
VERSION
=
tuple
(
map
(
int
,
__version__
.
split
(
'.'
)))
# Silence urllib3 INFO logging by default
...
...
jpush/report/core.py
View file @
da2ce84d
...
...
@@ -22,6 +22,19 @@ class Report(object):
received
=
self
.
send
(
"GET"
,
url
,
params
=
params
)
return
received
def
get_status_messages
(
self
,
msg_id
,
reg_ids
,
date
=
None
):
url
=
common
.
get_url
(
'report'
,
self
.
zone
)
+
'status/messages'
if
not
isinstance
(
reg_ids
,
list
):
reg_ids
=
[
reg_ids
]
body
=
{
'msg_id'
:
msg_id
,
'registration_ids'
:
reg_ids
}
if
date
is
not
None
:
body
[
'date'
]
=
date
sm
=
self
.
send
(
"POST"
,
url
,
body
=
body
)
return
sm
def
get_messages
(
self
,
msg_ids
):
url
=
common
.
get_url
(
'report'
,
self
.
zone
)
+
'messages'
params
=
{
'msg_ids'
:
msg_ids
}
...
...
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