mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01:00
2021-12-04 Fred Gleason <fredg@paravelsystems.com>
* Fixed multiple typos in the inline documentation for the 'rivwebpyapi' API. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -22653,3 +22653,6 @@
|
|||||||
* Added a 'ListCuts()' method to the 'rivwebpyapi' API.
|
* Added a 'ListCuts()' method to the 'rivwebpyapi' API.
|
||||||
2021-12-04 Fred Gleason <fredg@paravelsystems.com>
|
2021-12-04 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Added a 'ListSystemSettings()' method to the 'rivwebpyapi' API.
|
* Added a 'ListSystemSettings()' method to the 'rivwebpyapi' API.
|
||||||
|
2021-12-04 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed multiple typos in the inline documentation for the
|
||||||
|
'rivwebpyapi' API.
|
||||||
|
|||||||
@@ -208,7 +208,8 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListCart(self,cart_number,include_cuts=False):
|
def ListCart(self,cart_number,include_cuts=False):
|
||||||
"""
|
"""
|
||||||
Returns a Rivendell cart (dictionary)
|
Returns the metadata associated with a Rivendell cart
|
||||||
|
(list of dictionaries).
|
||||||
|
|
||||||
Takes the following arguments:
|
Takes the following arguments:
|
||||||
|
|
||||||
@@ -284,7 +285,8 @@ class rivwebpyapi(object):
|
|||||||
def ListCarts(self,group_name='',filter_string='',cart_type='all',
|
def ListCarts(self,group_name='',filter_string='',cart_type='all',
|
||||||
include_cuts=False):
|
include_cuts=False):
|
||||||
"""
|
"""
|
||||||
Returns a list of Rivendell carts (dictionary)
|
Returns the metadata associated with a set of Rivendell carts
|
||||||
|
(list of dictionaries)
|
||||||
|
|
||||||
Takes the following arguments:
|
Takes the following arguments:
|
||||||
|
|
||||||
@@ -367,7 +369,8 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListCartSchedCodes(self,cart_number):
|
def ListCartSchedCodes(self,cart_number):
|
||||||
"""
|
"""
|
||||||
Returns a list of Rivendell schedule codes (dictionary)
|
Returns the set of scheduler codes associated with a Rivendell
|
||||||
|
cart (list of dictionaries)
|
||||||
|
|
||||||
Takes the following arguments:
|
Takes the following arguments:
|
||||||
|
|
||||||
@@ -410,7 +413,8 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListCut(self,cart_number,cut_number):
|
def ListCut(self,cart_number,cut_number):
|
||||||
"""
|
"""
|
||||||
Returns a Rivendell cut (dictionary).
|
Returns the metadata associated with a Rivendell cut
|
||||||
|
(list of dictionaries).
|
||||||
|
|
||||||
Takes the following arguments:
|
Takes the following arguments:
|
||||||
|
|
||||||
@@ -502,7 +506,8 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListCuts(self,cart_number):
|
def ListCuts(self,cart_number):
|
||||||
"""
|
"""
|
||||||
Returns Rivendell cuts belonging to a cart (dictionary).
|
Returns the metadata associated with all of the cuts in
|
||||||
|
a Rivendell cart (list of dictionaries).
|
||||||
|
|
||||||
Takes the following argument:
|
Takes the following argument:
|
||||||
|
|
||||||
@@ -588,7 +593,7 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListGroup(self,group_name):
|
def ListGroup(self,group_name):
|
||||||
"""
|
"""
|
||||||
Returns a list of Rivendell groups (dictionary).
|
Returns a Rivendell group (list of dictionaries).
|
||||||
|
|
||||||
Takes the following argument:
|
Takes the following argument:
|
||||||
|
|
||||||
@@ -636,7 +641,7 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListGroups(self):
|
def ListGroups(self):
|
||||||
"""
|
"""
|
||||||
Returns a list of Rivendell groups (dictionary).
|
Returns a list of all Rivendell groups (list of dictionaries).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -678,7 +683,7 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListLog(self,log_name):
|
def ListLog(self,log_name):
|
||||||
"""
|
"""
|
||||||
Returns a list of Rivendell logs (dictionary).
|
Returns the contents of a Rivendell log (list of dictionaries).
|
||||||
|
|
||||||
Takes the following argument:
|
Takes the following argument:
|
||||||
|
|
||||||
@@ -788,7 +793,8 @@ class rivwebpyapi(object):
|
|||||||
def ListLogs(self,service_name='',log_name='',trackable=False,
|
def ListLogs(self,service_name='',log_name='',trackable=False,
|
||||||
filter_string='',recent=False):
|
filter_string='',recent=False):
|
||||||
"""
|
"""
|
||||||
Returns a list of Rivendell logs (dictionary).
|
Returns the metadata for a set of Rivendell logs
|
||||||
|
(list of dictionaries).
|
||||||
|
|
||||||
Takes the following arguments:
|
Takes the following arguments:
|
||||||
|
|
||||||
@@ -865,7 +871,8 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListSchedulerCodes(self):
|
def ListSchedulerCodes(self):
|
||||||
"""
|
"""
|
||||||
Returns a list of all available Rivendell schedule codes (dictionary)
|
Returns a list of all defined Rivendell schedule codes
|
||||||
|
(list of dictionaries)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -898,13 +905,14 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListServices(self,trackable):
|
def ListServices(self,trackable):
|
||||||
"""
|
"""
|
||||||
Returns a list of Rivendell services (dictionary).
|
Returns a set of Rivendell services (list of dictionaries).
|
||||||
|
|
||||||
Takes one argument:
|
Takes one argument:
|
||||||
|
|
||||||
trackable - Boolean. If True, return will include only services that
|
trackable - Boolean. If True, return will include only services that
|
||||||
are configured to support voice tracking. If False,
|
are configured to support voice tracking. If False,
|
||||||
all configured services will be included.
|
all configured services for which the user has access
|
||||||
|
will be included.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -941,7 +949,7 @@ class rivwebpyapi(object):
|
|||||||
|
|
||||||
def ListSystemSettings(self):
|
def ListSystemSettings(self):
|
||||||
"""
|
"""
|
||||||
Returns Rivendell system settings (dictionary)
|
Returns Rivendell system settings (list of dictionaries).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# RivWebPyApi test script for Rivendell
|
# RivWebPyApi test script for Rivendell
|
||||||
#
|
#
|
||||||
# Test the ListLogs Web API call
|
# Test the ListCart Web API call
|
||||||
#
|
#
|
||||||
# (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
# (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# RivWebPyApi test script for Rivendell
|
# RivWebPyApi test script for Rivendell
|
||||||
#
|
#
|
||||||
# Test the ListLogs Web API call
|
# Test the ListCarts Web API call
|
||||||
#
|
#
|
||||||
# (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
# (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ if((not url)or(not username)):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the cart list
|
# Get the cut list
|
||||||
#
|
#
|
||||||
webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
|
webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
|
||||||
cuts=webapi.ListCut(cart_number=cart_number,cut_number=cut_number)
|
cuts=webapi.ListCut(cart_number=cart_number,cut_number=cut_number)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Display the cart list
|
# Display the cut list
|
||||||
#
|
#
|
||||||
for cut in cuts:
|
for cut in cuts:
|
||||||
print('cutName: '+str(cut['cutName']))
|
print('cutName: '+str(cut['cutName']))
|
||||||
|
|||||||
@@ -55,13 +55,13 @@ if((not url)or(not username)):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the cart list
|
# Get the cut list
|
||||||
#
|
#
|
||||||
webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
|
webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
|
||||||
cuts=webapi.ListCuts(cart_number=cart_number)
|
cuts=webapi.ListCuts(cart_number=cart_number)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Display the cart list
|
# Display the cut list
|
||||||
#
|
#
|
||||||
for cut in cuts:
|
for cut in cuts:
|
||||||
print('cutName: '+str(cut['cutName']))
|
print('cutName: '+str(cut['cutName']))
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ recent=False
|
|||||||
#
|
#
|
||||||
# Get login parameters
|
# Get login parameters
|
||||||
#
|
#
|
||||||
usage='list_log --url=<rd-url> --username=<rd-username> [--password=<passwd>] [--log-name=<name>]'
|
usage='list_log --url=<rd-url> --username=<rd-username> --log-name=<name> [--password=<passwd>]'
|
||||||
for arg in sys.argv:
|
for arg in sys.argv:
|
||||||
f0=arg.split('=')
|
f0=arg.split('=')
|
||||||
if(len(f0)==2):
|
if(len(f0)==2):
|
||||||
@@ -52,7 +52,7 @@ for arg in sys.argv:
|
|||||||
log_name=f0[1]
|
log_name=f0[1]
|
||||||
if(not password):
|
if(not password):
|
||||||
password=getpass.getpass()
|
password=getpass.getpass()
|
||||||
if((not url)or(not username)):
|
if((not url)or(not username)or(not log_name)):
|
||||||
print(usage)
|
print(usage)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!%PYTHON_BANGPATH%
|
#!%PYTHON_BANGPATH%
|
||||||
|
|
||||||
# login_test.py
|
# list_services.py
|
||||||
#
|
#
|
||||||
# RivWebPyApi test script for Rivendell
|
# RivWebPyApi test script for Rivendell
|
||||||
#
|
#
|
||||||
# Attempt to log in to the Rivendell Web API
|
# Test the ListServices Web API call
|
||||||
#
|
#
|
||||||
# (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
# (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
|
|||||||
settings=webapi.ListSystemSettings()
|
settings=webapi.ListSystemSettings()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Display the code list
|
# Display the settings list
|
||||||
#
|
#
|
||||||
for setting in settings:
|
for setting in settings:
|
||||||
print('realmName: '+str(setting['realmName']))
|
print('realmName: '+str(setting['realmName']))
|
||||||
|
|||||||
Reference in New Issue
Block a user