finish adding doc strings to endpoints
This commit is contained in:
+169
@@ -103,52 +103,221 @@ def GetFieldsByAppIdEndpoint(baseUrl: str, appId: int):
|
|||||||
# file endpoints
|
# file endpoints
|
||||||
|
|
||||||
def GetFileInfoByIdEndpoint(baseUrl: str, recordId: int, fieldId: int, fileId: int):
|
def GetFileInfoByIdEndpoint(baseUrl: str, recordId: int, fieldId: int, fileId: int):
|
||||||
|
"""
|
||||||
|
Returns the get file info by its id endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
recordId (`int`): The id for the record where the file resides.
|
||||||
|
fieldId (`int`): The id for the field in the record where the file is held.
|
||||||
|
fileId ('int'): The id of the file.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The get file info by its id endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Files/recordId/{recordId}/fieldId/{fieldId}/fileId/{fileId}'
|
return f'{baseUrl}/Files/recordId/{recordId}/fieldId/{fieldId}/fileId/{fileId}'
|
||||||
|
|
||||||
def DeleteFileByIdEndpoint(baseUrl: str, recordId: int, fieldId: int, fileId: int):
|
def DeleteFileByIdEndpoint(baseUrl: str, recordId: int, fieldId: int, fileId: int):
|
||||||
|
"""
|
||||||
|
Returns the delete file by its id endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
recordId (`int`): The id for the record where the file resides.
|
||||||
|
fieldId (`int`): The id for the field in the record where the file is held.
|
||||||
|
fileId ('int'): The id of the file.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The delete file by its id endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Files/recordId/{recordId}/fieldId/{fieldId}/fileId/{fileId}'
|
return f'{baseUrl}/Files/recordId/{recordId}/fieldId/{fieldId}/fileId/{fileId}'
|
||||||
|
|
||||||
def GetFileByIdEndpoint(baseUrl: str, recordId: int, fieldId: int, fileId: int):
|
def GetFileByIdEndpoint(baseUrl: str, recordId: int, fieldId: int, fileId: int):
|
||||||
|
"""
|
||||||
|
Returns the get file by its id endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
recordId (`int`): The id for the record where the file resides.
|
||||||
|
fieldId (`int`): The id for the field in the record where the file is held.
|
||||||
|
fileId ('int'): The id of the file.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The get file by its id endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Files/recordId/{recordId}/fieldId/{fieldId}/fileId/{fileId}/file'
|
return f'{baseUrl}/Files/recordId/{recordId}/fieldId/{fieldId}/fileId/{fileId}/file'
|
||||||
|
|
||||||
def SaveFileEndpoint(baseUrl: str):
|
def SaveFileEndpoint(baseUrl: str):
|
||||||
|
"""
|
||||||
|
Returns the save file endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The save file endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Files'
|
return f'{baseUrl}/Files'
|
||||||
|
|
||||||
# list endpoints
|
# list endpoints
|
||||||
|
|
||||||
def AddOrUpdateListItemEndpoint(baseUrl, listId: int):
|
def AddOrUpdateListItemEndpoint(baseUrl, listId: int):
|
||||||
|
"""
|
||||||
|
Returns the add or update list item endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
listId (`int`): The id of the list for which the item belongs when being updated or being added to.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The add or update list item endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Lists/id/{listId}/items'
|
return f'{baseUrl}/Lists/id/{listId}/items'
|
||||||
|
|
||||||
def DeleteListItemEndpoint(baseUrl: str, listId: int, itemId: uuid):
|
def DeleteListItemEndpoint(baseUrl: str, listId: int, itemId: uuid):
|
||||||
|
"""
|
||||||
|
Returns the delete list item endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
listId (`int`): The id of the list for which the list item belongs.
|
||||||
|
itemId (`int`): The id list item.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The delete list item endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Lists/id/{listId}/itemId/{itemId}'
|
return f'{baseUrl}/Lists/id/{listId}/itemId/{itemId}'
|
||||||
|
|
||||||
# record endpoints
|
# record endpoints
|
||||||
|
|
||||||
def GetRecordsByAppIdEndpoint(baseUrl, appId: int):
|
def GetRecordsByAppIdEndpoint(baseUrl, appId: int):
|
||||||
|
"""
|
||||||
|
Returns the get records by app id endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
appId (`int`): The id of the app where the records reside.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The get records by app id endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Records/appId/{appId}'
|
return f'{baseUrl}/Records/appId/{appId}'
|
||||||
|
|
||||||
def GetRecordByIdEndpoint(baseUrl, appId: int, recordId: int):
|
def GetRecordByIdEndpoint(baseUrl, appId: int, recordId: int):
|
||||||
|
"""
|
||||||
|
Returns the get record by id endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
appId (`int`): The id of the app where the record resides.
|
||||||
|
recordId (`int`): The id of the record.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The get record by id endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Records/appId/{appId}/recordId/{recordId}'
|
return f'{baseUrl}/Records/appId/{appId}/recordId/{recordId}'
|
||||||
|
|
||||||
def DeleteRecordByIdEndpoint(baseUrl, appId: int, recordId: int):
|
def DeleteRecordByIdEndpoint(baseUrl, appId: int, recordId: int):
|
||||||
|
"""
|
||||||
|
Returns the delete record by id endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
appId (`int`): The id of the app where the record resides.
|
||||||
|
recordId (`int`): The id of the record.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The delete record by id endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Records/appId/{appId}/recordId/{recordId}'
|
return f'{baseUrl}/Records/appId/{appId}/recordId/{recordId}'
|
||||||
|
|
||||||
def GetRecordsByIdsEndpoint(baseUrl):
|
def GetRecordsByIdsEndpoint(baseUrl):
|
||||||
|
"""
|
||||||
|
Returns the get records by ids endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The get records by ids endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Records/batch-get'
|
return f'{baseUrl}/Records/batch-get'
|
||||||
|
|
||||||
def QueryRecordsEndpoint(baseUrl):
|
def QueryRecordsEndpoint(baseUrl):
|
||||||
|
"""
|
||||||
|
Returns the query records endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The query records endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Records/Query'
|
return f'{baseUrl}/Records/Query'
|
||||||
|
|
||||||
def AddOrUpdateRecordEndpoint(baseUrl):
|
def AddOrUpdateRecordEndpoint(baseUrl):
|
||||||
|
"""
|
||||||
|
Returns the add or update record endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The add or update record endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Records'
|
return f'{baseUrl}/Records'
|
||||||
|
|
||||||
def DeleteRecordsByIds(baseUrl):
|
def DeleteRecordsByIds(baseUrl):
|
||||||
|
"""
|
||||||
|
Returns the delete records by ids endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The delete records by ids endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Records/batch-delete'
|
return f'{baseUrl}/Records/batch-delete'
|
||||||
|
|
||||||
# report endpoints
|
# report endpoints
|
||||||
|
|
||||||
def GetReportByIdEndpoint(baseUrl, reportId: int):
|
def GetReportByIdEndpoint(baseUrl, reportId: int):
|
||||||
|
"""
|
||||||
|
Returns the get report by id endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
reportId (`int`): The id of the report.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The get report by id endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Reports/id/{reportId}'
|
return f'{baseUrl}/Reports/id/{reportId}'
|
||||||
|
|
||||||
def GetReportsByAppIdEndpoint(baseUrl, appId: int):
|
def GetReportsByAppIdEndpoint(baseUrl, appId: int):
|
||||||
|
"""
|
||||||
|
Returns the get reports by app id endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
baseUrl (`str`): The base url for the api.
|
||||||
|
appId (`int`): The id of the app where the reports reside.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The get reports by app id endpoint as a string.
|
||||||
|
"""
|
||||||
|
|
||||||
return f'{baseUrl}/Reports/appId/{appId}'
|
return f'{baseUrl}/Reports/appId/{appId}'
|
||||||
Reference in New Issue
Block a user