FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
api-examples/python/statuses_get_all.py at master · R-Vision/api-examples · GitHub
R-Vision
/
api-examples
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
1
Code
Issues
0
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
api-examples
/
python
/
statuses_get_all.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (29 loc) · 811 Bytes
Breadcrumbs
api-examples
/
python
/
statuses_get_all.py
Copy path
File metadata and controls
39 lines (29 loc) · 811 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import
json
import
requests
PROTOCOL
=
'http'
# or https
RVISION
=
'127.0.0.1'
# ip or hostname
USERNAME
=
'admin'
# any user login
PASSWORD
=
'admin'
requests
.
packages
.
urllib3
.
disable_warnings
()
s
=
requests
.
Session
()
# Авторизируемся
login
=
s
.
post
(
PROTOCOL
+
'://'
+
RVISION
+
'/login'
,
data
=
{
'username'
:
USERNAME
,
'password'
:
PASSWORD
},
verify
=
False
)
loginResult
=
login
.
json
()
statuses
=
s
.
get
(
PROTOCOL
+
'://'
+
RVISION
+
'/api/v1/im/directories/status/17'
,
params
=
{
'withoutHidden'
:
False
# Включаем скрытые статусы
},
verify
=
False
)
statusesResult
=
statuses
.
json
()
print
json
.
dumps
(
statusesResult
,
indent
=
2
,
sort_keys
=
True
,
ensure_ascii
=
False
)
Back
|
FazBrowse Home
|
New Git URL