more work;

This commit is contained in:
StevanFreeborn
2022-04-19 11:13:32 -05:00
parent 98839ec4c8
commit 4b9a386a43
+7 -6
View File
@@ -10,7 +10,7 @@ url = cfg['prod']['url']
onspringClient = OnspringClient(url, key) onspringClient = OnspringClient(url, key)
def GetRecordsByAppRequestTest(): def GetRecordsByAppIdTest():
request = GetRecordsByAppRequest(240, dataFormat=DataFormat.Raw.name) request = GetRecordsByAppRequest(240, dataFormat=DataFormat.Raw.name)
@@ -29,17 +29,18 @@ def GetRecordsByAppRequestTest():
for field in record.fields: for field in record.fields:
print(f' Type: {field.type}, FieldId: {field.fieldId}, Value: {field.getValue()}') print(f' Type: {field.type}, FieldId: {field.fieldId}, Value: {field.getValue()}')
def SaveFileTest():
filePath = 'C:\\Users\\sfree\\OneDrive\\Desktop\\Test Attachment.txt'
filePath = 'C:\\Users\\sfree\\OneDrive\\Desktop\\Test Attachment.txt' request = SaveFileRequest(
request = SaveFileRequest(
60, 60,
6989, 6989,
'Test Attachment.text', 'Test Attachment.text',
filePath, 'text/plain', filePath, 'text/plain',
'Updating record with attachment') 'Updating record with attachment')
response = onspringClient.SaveFile(request) response = onspringClient.SaveFile(request)
print(response.statusCode) print(response.statusCode)
print(response.data.id)