sintonia/python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py
Martin Konecny 34eee60bee CC-4910: Need to properly handle non-200 http status codes in api client
-wrap all service calls in exception
2013-02-03 00:40:41 -05:00

21 lines
420 B
Python

from api_clients import *
import sys
api_clients = api_client.AirtimeApiClient()
dj_type = sys.argv[1]
username = sys.argv[2]
password = sys.argv[3]
source_type = ''
if dj_type == '--master':
source_type = 'master'
elif dj_type == '--dj':
source_type = 'dj'
response = api_clients.check_live_stream_auth(username, password, source_type)
if 'msg' in response:
print response['msg']
else:
print False