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
77d15999
Commit
77d15999
authored
Oct 19, 2015
by
hupantingxue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return get/set/update/delete device info;
parent
b5d0e42d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
core.py
jpush/device/core.py
+8
-0
No files found.
jpush/device/core.py
View file @
77d15999
...
...
@@ -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.
...
...
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