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
b90b648b
Commit
b90b648b
authored
Apr 22, 2016
by
fendouai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add report api GET /v3/users
parent
7982c543
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
example_users.py
examples/report/example_users.py
+7
-0
core.py
jpush/report/core.py
+10
-2
No files found.
examples/report/example_users.py
0 → 100644
View file @
b90b648b
import
jpush
as
jpush
from
conf
import
app_key
,
master_secret
_jpush
=
jpush
.
JPush
(
app_key
,
master_secret
)
report
=
_jpush
.
create_report
();
report
.
get_users
(
"DAY"
,
"2016-04-10"
,
"3"
)
\ No newline at end of file
jpush/report/core.py
View file @
b90b648b
...
@@ -33,6 +33,14 @@ class Report(object):
...
@@ -33,6 +33,14 @@ class Report(object):
print
(
messages
)
print
(
messages
)
return
messages
return
messages
def
get_users
(
self
,
time_unit
,
start
,
duration
):
url
=
common
.
USERS_URL
+
"time_unit="
+
time_unit
+
"&start="
+
start
+
"&duration="
+
duration
print
url
body
=
None
users
=
self
.
send
(
"GET"
,
url
,
body
)
print
(
users
)
return
users
class
ReportResponse
(
object
):
class
ReportResponse
(
object
):
"""Response to a successful device request send.
"""Response to a successful device request send.
...
@@ -51,4 +59,4 @@ class ReportResponse(object):
...
@@ -51,4 +59,4 @@ class ReportResponse(object):
self
.
payload
=
"success"
self
.
payload
=
"success"
def
__str__
(
self
):
def
__str__
(
self
):
return
"Device response Payload: {0}"
.
format
(
self
.
payload
)
return
"Report response Payload: {0}"
.
format
(
self
.
payload
)
\ No newline at end of file
\ No newline at end of file
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