docs: add get apps section

This commit is contained in:
Stevan Freeborn
2023-04-16 21:59:23 -05:00
parent 0ba9107f21
commit 587777e776
11 changed files with 158 additions and 11 deletions
@@ -12,7 +12,7 @@ These are objects representing a content record in your instance. You can create
---
- App Id
- appId
- `number`
- The id of the app or survey.
@@ -15,25 +15,24 @@ var onspringClient = new OnspringClient(
config.ApiKey
);
var response = await onspringClient.GetAppsAsync();
var getReportsResponse = await onspringClient.GetReportsForAppAsync(195);
foreach (var app in response.Value.Items)
foreach (var report in getReportsResponse.Value.Items)
{
Console.WriteLine($"{app.Id}, {app.Name}");
Console.WriteLine($"{report.Id}, {report.AppId}, {report.Name}");
}
```
```javascript
import {
GetRecordsByAppIdRequest,
OnspringClient,
} from 'onspring-api-sdk';
import dotenv from 'dotenv';
import { OnspringClient } from 'onspring-api-sdk';
dotenv.config();
const client = new OnspringClient(
process.env.BASE_URL,
process.env.API_KEY
);
const res = await client.getApps();
const request = new GetRecordsByAppIdRequest(195);
const res = await client.getRecordsByAppId(request);
const apps = res.data.items;
for (const app of apps) {