beginning to work on record endpoints;

This commit is contained in:
StevanFreeborn
2022-04-17 00:31:43 -05:00
parent 81091b9f43
commit bf42fc54a9
4 changed files with 41 additions and 15 deletions
+15 -4
View File
@@ -798,14 +798,25 @@ class OnspringClient:
# record methods
def GetRecordsByAppId(self, appId: int):
def GetRecordsByAppId(self, getRecordsByAppRequest: GetRecordsByAppRequest):
endpoint = GetRecordsByAppIdEndpoint(self.baseUrl, appId)
endpoint = GetRecordsByAppIdEndpoint(self.baseUrl, getRecordsByAppRequest.appId)
params = getRecordsByAppRequest.__dict__
# remove appId from params
del params['appId']
# convert list of fieldIds to string of comma separated values
params['fieldIds'] = ",".join([str(i) for i in params['fieldIds']])
response = requests.request(
'GET',)
'GET',
endpoint,
headers=self.headers,
params=params)
return
return response
def GetRecordById(self, appId: int, recordId: int):