Commit 77d15999 authored by hupantingxue's avatar hupantingxue

Return get/set/update/delete device info;

parent b5d0e42d
......@@ -25,6 +25,7 @@ class Device(object):
body = None
info = self.send("GET", url, body)
print (info)
return info
def get_deviceinfo(self, registration_id):
"""Get deviceinfo with registration id.
......@@ -33,6 +34,7 @@ class Device(object):
body = None
info = self.send("GET", url, body)
print (info)
return info
def set_deviceinfo(self, registration_id, entity):
"""Update deviceinfo with registration id.
......@@ -41,6 +43,7 @@ class Device(object):
body = json.dumps(entity)
info = self.send("POST", url, body)
print (url), (body), (info)
return info
def delete_tag(self, tag, platform=None):
"""Delete registration id tag.
......@@ -52,6 +55,7 @@ class Device(object):
print (url), (body)
info = self.send("DELETE", url, body)
print (info)
return info
def update_tagusers(self, tag, entity):
"""Add/Remove specified tag users.
......@@ -61,6 +65,7 @@ class Device(object):
print (url), (body)
info = self.send("POST", url, body)
print (info)
return info
def check_taguserexist(self, tag, registration_id):
"""Check registration id whether in tag.
......@@ -70,6 +75,7 @@ class Device(object):
print (url), (registration_id)
info = self.send("GET", url, body)
print (info)
return info
def delete_alias(self, alias, platform=None):
"""Delete appkey alias.
......@@ -81,6 +87,7 @@ class Device(object):
print (url), (body)
info = self.send("DELETE", url, body)
print (info)
return info
def get_aliasuser(self, alias, platform=None):
"""Get appkey alias users.
......@@ -92,6 +99,7 @@ class Device(object):
print (url), (body)
info = self.send("GET", url, body)
print (info)
return info
class DeviceResponse(object):
"""Response to a successful device request send.
......
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