2021-12-09 Fred Gleason <fredg@paravelsystems.com>

* Added a 'RemoveImage()' method to the 'rivwebpyapi' API.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-12-09 16:10:03 -05:00
parent 1287cce718
commit c7fdbf8559
4 changed files with 105 additions and 0 deletions

View File

@@ -1920,6 +1920,35 @@ class rivwebpyapi(object):
if(r.status_code!=requests.codes.ok):
self.__throwError(response=r)
def RemoveImage(self,image_id):
"""
Upload a podcast image to the remote archive.
Takes the following argument:
image_id - ID of the image (integer).
"""
if(image_id<0):
raise ValueError('invalid image ID')
#
# Build the WebAPI arguments
#
postdata={
'COMMAND': '45',
'LOGIN_NAME': self.__connection_username,
'PASSWORD': self.__connection_password,
'ID': str(image_id)
}
#
# Fetch the audio data
#
r=requests.post(self.__connection_url,data=postdata)
if(r.status_code!=requests.codes.ok):
self.__throwError(response=r)
def TrimAudio(self,cart_number,cut_number,trim_level):
"""
Return time pointers to the first and last instance of a