Commit b90b648b authored by fendouai's avatar fendouai

add report api GET /v3/users

parent 7982c543
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
......@@ -33,6 +33,14 @@ class Report(object):
print (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):
"""Response to a successful device request send.
......@@ -51,4 +59,4 @@ class ReportResponse(object):
self.payload = "success"
def __str__(self):
return "Device response Payload: {0}".format(self.payload)
\ No newline at end of file
return "Report response Payload: {0}".format(self.payload)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment