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

* Modified the 'rivwebpyapi.Import()' method to return a dictionary
	containing the cart and cut numbers of the import destination.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-12-08 13:24:27 -05:00
parent 9d4e6bbf2c
commit 4b3ae602b9
3 changed files with 37 additions and 7 deletions

View File

@@ -844,6 +844,21 @@ class rivwebpyapi(object):
if(r.status_code!=requests.codes.ok):
self.__throwError(response=r)
#
# Process Response
#
fields={
'ResponseCode': 'integer',
'ErrorString': 'string',
'CartNumber': 'integer',
'CutNumber': 'integer'
}
handler=RivWebPyApi_ListHandler(base_tag='RDWebResult',fields=fields)
xml.sax.parseString(r.text,handler)
output=handler.output();
if(len(output)==1):
return output[0]
def ListCart(self,cart_number,include_cuts=False):
"""
Returns the metadata associated with a Rivendell cart