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
4ca44058
Commit
4ca44058
authored
Sep 02, 2014
by
hupantingxue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue: python 3.x print replaced to print ();
parent
9cabd36e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
core.py
jpush/device/core.py
+13
-13
No files found.
jpush/device/core.py
View file @
4ca44058
...
...
@@ -30,6 +30,7 @@ class Device(object):
url
=
common
.
TAGLIST_URL
body
=
None
info
=
self
.
send
(
"GET"
,
url
,
body
)
print
(
info
)
def
get_deviceinfo
(
self
,
registration_id
):
"""Get deviceinfo with registration id.
...
...
@@ -37,16 +38,15 @@ class Device(object):
url
=
common
.
DEVICE_URL
+
registration_id
+
"/"
body
=
None
info
=
self
.
send
(
"GET"
,
url
,
body
)
print
info
print
(
info
)
def
set_deviceinfo
(
self
,
registration_id
,
entity
):
"""Update deviceinfo with registration id.
"""
url
=
common
.
DEVICE_URL
+
registration_id
+
"/"
body
=
json
.
dumps
(
entity
)
print
url
,
body
info
=
self
.
send
(
"POST"
,
url
,
body
)
print
info
print
(
url
),
(
body
),
(
info
)
def
delete_tag
(
self
,
tag
,
platform
=
None
):
"""Delete registration id tag.
...
...
@@ -55,27 +55,27 @@ class Device(object):
body
=
None
if
platform
:
body
=
platform
print
url
,
body
print
(
url
),
(
body
)
info
=
self
.
send
(
"DELETE"
,
url
,
body
)
print
info
print
(
info
)
def
update_tagusers
(
self
,
tag
,
entity
):
"""Add/Remove specified tag users.
"""
url
=
common
.
TAG_URL
+
tag
+
"/"
body
=
json
.
dumps
(
entity
)
print
url
,
body
print
(
url
),
(
body
)
info
=
self
.
send
(
"POST"
,
url
,
body
)
print
info
print
(
info
)
def
check_taguserexist
(
self
,
tag
,
registration_id
):
"""Check registration id whether in tag.
"""
url
=
common
.
TAG_URL
+
tag
+
"/exist/"
body
=
registration_id
print
url
,
registration_id
print
(
url
),
(
registration_id
)
info
=
self
.
send
(
"GET"
,
url
,
body
)
print
info
print
(
info
)
def
delete_alias
(
self
,
alias
,
platform
=
None
):
"""Delete appkey alias.
...
...
@@ -84,9 +84,9 @@ class Device(object):
body
=
None
if
platform
:
body
=
platform
print
url
,
body
print
(
url
),
(
body
)
info
=
self
.
send
(
"DELETE"
,
url
,
body
)
print
info
print
(
info
)
def
get_aliasuser
(
self
,
alias
,
platform
=
None
):
"""Get appkey alias users.
...
...
@@ -95,9 +95,9 @@ class Device(object):
body
=
None
if
platform
:
body
=
platform
print
url
,
body
print
(
url
),
(
body
)
info
=
self
.
send
(
"GET"
,
url
,
body
)
print
info
print
(
info
)
class
DeviceResponse
(
object
):
"""Response to a successful device request send.
...
...
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