Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Re2o
dhcp
Commits
d72f23d0
Commit
d72f23d0
authored
May 24, 2018
by
moamoak
Browse files
Basic API interaction
parent
031bef90
Changes
2
Hide whitespace changes
Inline
Side-by-side
config.ini
0 → 100644
View file @
d72f23d0
[Re2o]
hostname
=
re2o-dev.rez-rennes.fr
username
=
moamoak
password
=
motdepasse
main.py
0 → 100644
View file @
d72f23d0
from
configparser
import
ConfigParser
from
re2oapi
import
Re2oAPIClient
config
=
ConfigParser
()
config
.
read
(
'config.ini'
)
hostname
=
config
.
get
(
'Re2o'
,
'hostname'
)
password
=
config
.
get
(
'Re2o'
,
'password'
)
username
=
config
.
get
(
'Re2o'
,
'username'
)
api_client
=
Re2oAPIClient
(
hostname
,
username
,
password
)
extensions
=
api_client
.
list_extensions
()
print
(
len
(
extensions
))
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