mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-07 16:07:45 +02: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:
parent
308636eb72
commit
bdb038f7b1
@ -22653,3 +22653,6 @@
|
||||
* Added a 'ListCuts()' method to the 'rivwebpyapi' API.
|
||||
2021-12-04 Fred Gleason <fredg@paravelsystems.com>
|
||||
* 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):
|
||||
"""
|
||||
Returns a Rivendell cart (dictionary)
|
||||
Returns the metadata associated with a Rivendell cart
|
||||
(list of dictionaries).
|
||||
|
||||
Takes the following arguments:
|
||||
|
||||
@ -284,7 +285,8 @@ class rivwebpyapi(object):
|
||||
def ListCarts(self,group_name='',filter_string='',cart_type='all',
|
||||
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:
|
||||
|
||||
@ -367,7 +369,8 @@ class rivwebpyapi(object):
|
||||
|
||||
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:
|
||||
|
||||
@ -410,7 +413,8 @@ class rivwebpyapi(object):
|
||||
|
||||
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:
|
||||
|
||||
@ -502,7 +506,8 @@ class rivwebpyapi(object):
|
||||
|
||||
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:
|
||||
|
||||
@ -588,7 +593,7 @@ class rivwebpyapi(object):
|
||||
|
||||
def ListGroup(self,group_name):
|
||||
"""
|
||||
Returns a list of Rivendell groups (dictionary).
|
||||
Returns a Rivendell group (list of dictionaries).
|
||||
|
||||
Takes the following argument:
|
||||
|
||||
@ -636,7 +641,7 @@ class rivwebpyapi(object):
|
||||
|
||||
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):
|
||||
"""
|
||||
Returns a list of Rivendell logs (dictionary).
|
||||
Returns the contents of a Rivendell log (list of dictionaries).
|
||||
|
||||
Takes the following argument:
|
||||
|
||||
@ -788,7 +793,8 @@ class rivwebpyapi(object):
|
||||
def ListLogs(self,service_name='',log_name='',trackable=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:
|
||||
|
||||
@ -865,7 +871,8 @@ class rivwebpyapi(object):
|
||||
|
||||
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):
|
||||
"""
|
||||
Returns a list of Rivendell services (dictionary).
|
||||
Returns a set of Rivendell services (list of dictionaries).
|
||||
|
||||
Takes one argument:
|
||||
|
||||
trackable - Boolean. If True, return will include only services that
|
||||
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):
|
||||
"""
|
||||
Returns Rivendell system settings (dictionary)
|
||||
Returns Rivendell system settings (list of dictionaries).
|
||||
"""
|
||||
|
||||
#
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# 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>
|
||||
#
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# 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>
|
||||
#
|
||||
|
@ -58,13 +58,13 @@ if((not url)or(not username)):
|
||||
sys.exit(1)
|
||||
|
||||
#
|
||||
# Get the cart list
|
||||
# Get the cut list
|
||||
#
|
||||
webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
|
||||
cuts=webapi.ListCut(cart_number=cart_number,cut_number=cut_number)
|
||||
|
||||
#
|
||||
# Display the cart list
|
||||
# Display the cut list
|
||||
#
|
||||
for cut in cuts:
|
||||
print('cutName: '+str(cut['cutName']))
|
||||
|
@ -55,13 +55,13 @@ if((not url)or(not username)):
|
||||
sys.exit(1)
|
||||
|
||||
#
|
||||
# Get the cart list
|
||||
# Get the cut list
|
||||
#
|
||||
webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
|
||||
cuts=webapi.ListCuts(cart_number=cart_number)
|
||||
|
||||
#
|
||||
# Display the cart list
|
||||
# Display the cut list
|
||||
#
|
||||
for cut in cuts:
|
||||
print('cutName: '+str(cut['cutName']))
|
||||
|
@ -38,7 +38,7 @@ recent=False
|
||||
#
|
||||
# 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:
|
||||
f0=arg.split('=')
|
||||
if(len(f0)==2):
|
||||
@ -52,7 +52,7 @@ for arg in sys.argv:
|
||||
log_name=f0[1]
|
||||
if(not password):
|
||||
password=getpass.getpass()
|
||||
if((not url)or(not username)):
|
||||
if((not url)or(not username)or(not log_name)):
|
||||
print(usage)
|
||||
sys.exit(1)
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!%PYTHON_BANGPATH%
|
||||
|
||||
# login_test.py
|
||||
# list_services.py
|
||||
#
|
||||
# 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>
|
||||
#
|
||||
|
@ -59,7 +59,7 @@ webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
|
||||
settings=webapi.ListSystemSettings()
|
||||
|
||||
#
|
||||
# Display the code list
|
||||
# Display the settings list
|
||||
#
|
||||
for setting in settings:
|
||||
print('realmName: '+str(setting['realmName']))
|
||||
|
Loading…
x
Reference in New Issue
Block a user