import xmlrpclib
import ssl
context = ssl._create_default_https_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
url = "https://localhost:5000"
#url = "https://localhost:8443"
twitcher = xmlrpclib.ServerProxy(url, context=context)
twitcher.clear_services()
True
twitcher.list_services()
[]
twitcher.generate_token(1, {})
{'access_token': '695b289f150548cd815fdf377b04ed07', 'expires_at': 1484156404}
twitcher.register_service("http://localhost:8094/wps",
{'name': "emu", 'type': "WPS", 'public': False},
False)
{'c4i': False, 'name': 'emu', 'public': False, 'type': 'WPS', 'url': 'http://localhost:8094/wps'}
twitcher.list_services()
[{'c4i': False, 'name': 'emu', 'public': False, 'type': 'WPS', 'url': 'http://localhost:8094/wps'}]
twitcher.unregister_service('emu')
True
twitcher.list_services()
[]