mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-18 16:41:18 +02:00
2021-12-06 Fred Gleason <fredg@paravelsystems.com>
* Added an 'DeleteLog()' method to the 'rivwebpyapi' API. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -416,6 +416,35 @@ class rivwebpyapi(object):
|
||||
if(r.status_code!=requests.codes.ok):
|
||||
r.raise_for_status()
|
||||
|
||||
def DeleteLog(self,log_name):
|
||||
"""
|
||||
Delete an existing log.
|
||||
|
||||
Takes the following argument:
|
||||
|
||||
log_name - The name of the log to be deleted (string).
|
||||
"""
|
||||
|
||||
if(not log_name):
|
||||
raise ValueError('invalid log name')
|
||||
|
||||
#
|
||||
# Build the WebAPI arguments
|
||||
#
|
||||
postdata={
|
||||
'COMMAND': '30',
|
||||
'LOGIN_NAME': self.__connection_username,
|
||||
'PASSWORD': self.__connection_password,
|
||||
'LOG_NAME': log_name
|
||||
}
|
||||
|
||||
#
|
||||
# Fetch the XML
|
||||
#
|
||||
r=requests.post(self.__connection_url,data=postdata)
|
||||
if(r.status_code!=requests.codes.ok):
|
||||
r.raise_for_status()
|
||||
|
||||
def ListCart(self,cart_number,include_cuts=False):
|
||||
"""
|
||||
Returns the metadata associated with a Rivendell cart
|
||||
|
Reference in New Issue
Block a user