update README.md

This commit is contained in:
StevanFreeborn
2022-05-03 11:04:31 -05:00
parent 46a8c0d836
commit c279e315f7
+26
View File
@@ -101,6 +101,8 @@ else:
### Get Apps
Returns a paged collection of apps and/or surveys that can be paged through. By default the page size is 50 and page number is 1.
```python
response = client.GetApps()
@@ -116,9 +118,33 @@ for app in response.data.apps:
print(f'href: {app.href}')
```
You can set your own page size and page number (max is 1,000) as well.
```python
pagingRequest = PagingRequest(1, 100)
response = client.GetApps(pagingRequest)
print(f'Status Code: {response.statusCode}')
print(f'Page Size: {response.data.pageSize}')
print(f'Page Number: {response.data.pageNumber}')
print(f'Total Pages: {response.data.totalPages}')
print(f'Total Records: {response.data.totalRecords}')
for app in response.data.apps:
print(f'Id: {app.id}')
print(f'Name: {app.name}')
print(f'href: {app.href}')
```
### Get App By Id
```python
response = client.GetAppById(appId)
print(f'Status Code: {response.statusCode}')
print(f'id: {response.data.app.id}')
print(f'Name: {response.data.app.name}')
print(f'href: {response.data.app.href}')
```
### Get Apps By Ids