From bdb038f7b10f3b5aa92d602e39dab55a0c7e98c4 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 4 Dec 2021 14:00:56 -0500 Subject: [PATCH] 2021-12-04 Fred Gleason * Fixed multiple typos in the inline documentation for the 'rivwebpyapi' API. Signed-off-by: Fred Gleason --- ChangeLog | 3 ++ apis/rivwebpyapi/api/rivwebpyapi.py | 34 ++++++++++++------- apis/rivwebpyapi/tests/list_cart.py | 2 +- apis/rivwebpyapi/tests/list_carts.py | 2 +- apis/rivwebpyapi/tests/list_cut.py | 4 +-- apis/rivwebpyapi/tests/list_cuts.py | 4 +-- apis/rivwebpyapi/tests/list_log.py | 4 +-- apis/rivwebpyapi/tests/list_services.py | 4 +-- .../rivwebpyapi/tests/list_system_settings.py | 2 +- 9 files changed, 35 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index b23e80dc..8b8a47d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22653,3 +22653,6 @@ * Added a 'ListCuts()' method to the 'rivwebpyapi' API. 2021-12-04 Fred Gleason * Added a 'ListSystemSettings()' method to the 'rivwebpyapi' API. +2021-12-04 Fred Gleason + * Fixed multiple typos in the inline documentation for the + 'rivwebpyapi' API. diff --git a/apis/rivwebpyapi/api/rivwebpyapi.py b/apis/rivwebpyapi/api/rivwebpyapi.py index 4437157a..660ffbc8 100755 --- a/apis/rivwebpyapi/api/rivwebpyapi.py +++ b/apis/rivwebpyapi/api/rivwebpyapi.py @@ -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). """ # diff --git a/apis/rivwebpyapi/tests/list_cart.py b/apis/rivwebpyapi/tests/list_cart.py index bff9b73c..7ea5b0f6 100755 --- a/apis/rivwebpyapi/tests/list_cart.py +++ b/apis/rivwebpyapi/tests/list_cart.py @@ -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 # diff --git a/apis/rivwebpyapi/tests/list_carts.py b/apis/rivwebpyapi/tests/list_carts.py index b3cfc9c9..becbf0ad 100755 --- a/apis/rivwebpyapi/tests/list_carts.py +++ b/apis/rivwebpyapi/tests/list_carts.py @@ -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 # diff --git a/apis/rivwebpyapi/tests/list_cut.py b/apis/rivwebpyapi/tests/list_cut.py index d7d93fdc..9f99b031 100755 --- a/apis/rivwebpyapi/tests/list_cut.py +++ b/apis/rivwebpyapi/tests/list_cut.py @@ -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'])) diff --git a/apis/rivwebpyapi/tests/list_cuts.py b/apis/rivwebpyapi/tests/list_cuts.py index dd4b8984..b38c3f99 100755 --- a/apis/rivwebpyapi/tests/list_cuts.py +++ b/apis/rivwebpyapi/tests/list_cuts.py @@ -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'])) diff --git a/apis/rivwebpyapi/tests/list_log.py b/apis/rivwebpyapi/tests/list_log.py index 63fe61a3..12652fa9 100755 --- a/apis/rivwebpyapi/tests/list_log.py +++ b/apis/rivwebpyapi/tests/list_log.py @@ -38,7 +38,7 @@ recent=False # # Get login parameters # -usage='list_log --url= --username= [--password=] [--log-name=]' +usage='list_log --url= --username= --log-name= [--password=]' 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) diff --git a/apis/rivwebpyapi/tests/list_services.py b/apis/rivwebpyapi/tests/list_services.py index 8077e07f..047f582a 100755 --- a/apis/rivwebpyapi/tests/list_services.py +++ b/apis/rivwebpyapi/tests/list_services.py @@ -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 # diff --git a/apis/rivwebpyapi/tests/list_system_settings.py b/apis/rivwebpyapi/tests/list_system_settings.py index 93c04b6a..e77c2636 100755 --- a/apis/rivwebpyapi/tests/list_system_settings.py +++ b/apis/rivwebpyapi/tests/list_system_settings.py @@ -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']))