Commit 31f7ebfb authored by hupantingxue's avatar hupantingxue

Devices API url update;

parent e21f4c90
......@@ -6,10 +6,10 @@ BASE_URL = "https://api.jpush.cn/"
PUSH_URL = BASE_URL + 'v3/push'
DEVICE_BASEURL = "https://device.jpush.cn/"
DEVICE_URL = DEVICE_BASEURL + "v3/device/"
TAG_URL = DEVICE_BASEURL + "v3/tag/"
TAGLIST_URL = TAG_URL + "list/"
ALIAS_URL = DEVICE_BASEURL + "v3/alias/"
DEVICE_URL = DEVICE_BASEURL + "v3/devices/"
TAG_URL = DEVICE_BASEURL + "v3/tags/"
TAGLIST_URL = TAG_URL
ALIAS_URL = DEVICE_BASEURL + "v3/aliases/"
logger = logging.getLogger('jpush')
......
......@@ -2,12 +2,6 @@
from jpush import common
import json
DEVICE_BASEURL = "https://device.jpush.cn/"
DEVICE_URL = DEVICE_BASEURL + "v3/device/"
TAG_URL = DEVICE_BASEURL + "v3/tag/"
TAGLIST_URL = TAG_URL + "list/"
ALIAS_URL = DEVICE_BASEURL + "v3/alias/"
class Device(object):
"""Device info query/update..
......@@ -71,7 +65,7 @@ class Device(object):
def check_taguserexist(self, tag, registration_id):
"""Check registration id whether in tag.
"""
url = common.TAG_URL + tag + "/exist/"
url = common.TAG_URL + tag + "/registration_ids/" + registration_id
body = registration_id
print (url), (registration_id)
info = self.send("GET", url, body)
......
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