update README.md

This commit is contained in:
StevanFreeborn
2022-05-03 13:06:12 -05:00
parent d4f0db34ef
commit d6d44b2671
2 changed files with 21 additions and 0 deletions
+4
View File
@@ -273,6 +273,8 @@ response = client.GetFieldsByAppId(appId=195, pagingRequest)
#### Get File Info By Id #### Get File Info By Id
Returns the Onspring file's metadata.
```python ```python
response = client.GetFileInfoById(recordId=1, fieldId=6990, fileId=274) response = client.GetFileInfoById(recordId=1, fieldId=6990, fileId=274)
@@ -288,6 +290,8 @@ print(f'File Href: {response.data.fileInfo.fileHref}')
#### Get File By Id #### Get File By Id
Returns the file itself.
```python ```python
response = client.GetFileById(recordId=1, fieldId=6990, fileId=274) response = client.GetFileById(recordId=1, fieldId=6990, fileId=274)
+17
View File
@@ -0,0 +1,17 @@
filePath = 'C:\\Users\\sfree\\Documents\\Temp\\Test Attachment.txt'
# fileName = os.path.basename(filePath)
# contentType = mimetypes.guess_type(filePath)
# request = SaveFileRequest(
# 60,
# 6989,
# fileName,
# filePath,
# contentType,
# 'Initial revision',
# datetime.now())
# response = client.SaveFile(request)
# print(f'Status Code: {response.statusCode}')
# print(f'File Id: {response.data.id}')