feat: add more field value object examples
This commit is contained in:
@@ -13,19 +13,19 @@ These are objects representing a content record in your instance. You can create
|
|||||||
---
|
---
|
||||||
|
|
||||||
- App Id
|
- App Id
|
||||||
- number
|
- `number`
|
||||||
- The id of the app or survey.
|
- The id of the app or survey.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- recordId
|
- recordId
|
||||||
- number
|
- `number`
|
||||||
- The id of the record.
|
- The id of the record.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- fieldData
|
- fieldData
|
||||||
- object[]
|
- `object[]`
|
||||||
- An array of [Field Value](#field-values) objects.
|
- An array of [Field Value](#field-values) objects.
|
||||||
|
|
||||||
{% /table %}
|
{% /table %}
|
||||||
|
|||||||
@@ -13,19 +13,19 @@ These are objects representing a field value in a record. They will comprise the
|
|||||||
---
|
---
|
||||||
|
|
||||||
- type
|
- type
|
||||||
- string
|
- `string`
|
||||||
- The type of the field.
|
- The type of the field.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- fieldId
|
- fieldId
|
||||||
- number
|
- `number`
|
||||||
- The id of the field.
|
- The id of the field.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- value
|
- value
|
||||||
- object
|
- `object`
|
||||||
- The value of the field.
|
- The value of the field.
|
||||||
|
|
||||||
{% /table %}
|
{% /table %}
|
||||||
@@ -123,27 +123,33 @@ These are objects representing a field value in a record. They will comprise the
|
|||||||
---
|
---
|
||||||
|
|
||||||
- quantity
|
- quantity
|
||||||
- number
|
- `number`
|
||||||
- The number of the specified increment.
|
- The number of the specified increment.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- increment
|
- increment
|
||||||
- string
|
- `string`
|
||||||
- The increment of time. Can be one of the following values: `Years`, `Months`, `Days`, `Hours`, `Minutes`, `Seconds`.
|
- The increment of time. Can be one of the following values: `Years`, `Months`, `Days`, `Hours`, `Minutes`, `Seconds`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- recurrence
|
- recurrence
|
||||||
- string
|
- `string`
|
||||||
- The recurrence of the time span. Can be one of the following values: `None`, `EndByDate`, `EndAfterOccurrences`.
|
- The recurrence of the time span. Can be one of the following values: `None`, `EndByDate`, `EndAfterOccurrences`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- endByDate
|
- endByDate
|
||||||
- string
|
- `string`
|
||||||
- The end date of the time span. Used if `recurrence` is set to `EndByDate`.
|
- The end date of the time span. Used if `recurrence` is set to `EndByDate`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- endAfterOccurrences
|
||||||
|
- `number`
|
||||||
|
- The number of occurrences of the time span. Used if `recurrence` is set to `EndAfterOccurrences`.
|
||||||
|
|
||||||
{% /table %}
|
{% /table %}
|
||||||
|
|
||||||
### Attachment Value {% #attachment-value %}
|
### Attachment Value {% #attachment-value %}
|
||||||
@@ -157,25 +163,59 @@ These are objects representing a field value in a record. They will comprise the
|
|||||||
---
|
---
|
||||||
|
|
||||||
- fileId
|
- fileId
|
||||||
- number
|
- `number`
|
||||||
- The id of the file.
|
- The id of the file.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- fileName
|
- fileName
|
||||||
- string
|
- `string`
|
||||||
- The name of the file.
|
- The name of the file.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- notes
|
- notes
|
||||||
- string
|
- `string`
|
||||||
- The notes for the attachment.
|
- The notes for the attachment.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- storageLocation
|
- storageLocation
|
||||||
- string
|
- `string`
|
||||||
- The storage location of the file. Can be one of the following values: `Internal`, `OneDrive`, `GoogleDrive`.
|
- The storage location of the file. Can be one of the following values: `Internal`, `OneDrive`, `GoogleDrive`.
|
||||||
|
|
||||||
{% /table %}
|
{% /table %}
|
||||||
|
|
||||||
|
### Scoring Group Value {% #scoring-group-value %}
|
||||||
|
|
||||||
|
{% table .propertiesTable %}
|
||||||
|
|
||||||
|
- Property Name
|
||||||
|
- Data Type
|
||||||
|
- Description
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- listValueId
|
||||||
|
- `string`
|
||||||
|
- The id of the list value.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- name
|
||||||
|
- `string`
|
||||||
|
- The name of the scoring group.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- score
|
||||||
|
- `number`
|
||||||
|
- The score of the scoring group.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- maximumScore
|
||||||
|
- `number`
|
||||||
|
- The maximum score of the scoring group.
|
||||||
|
|
||||||
|
{% /table %}
|
||||||
|
|||||||
@@ -1,12 +1,97 @@
|
|||||||
# The Field Value Object
|
# The Field Value Object
|
||||||
|
|
||||||
{% code heading="FIELD VALUE" defaultLanguage="json" %}
|
{% code heading="FIELD VALUES" defaultLanguage="json" %}
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"type": "Integer",
|
"type": "Integer",
|
||||||
"fieldId": 6976,
|
"fieldId": 6976,
|
||||||
"value": 1
|
"value": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Date",
|
||||||
|
"fieldId": 4746,
|
||||||
|
"value": "2023-02-16T05:14:14Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "String",
|
||||||
|
"fieldId": 4753,
|
||||||
|
"value": "test@test.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Decimal",
|
||||||
|
"fieldId": 4756,
|
||||||
|
"value": 15.3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ScoringGroupList",
|
||||||
|
"fieldId": 4762,
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"listValueId": "c9e4d695-184c-48ec-a8ef-01a52b2bce39",
|
||||||
|
"name": "scoring_group_list_1",
|
||||||
|
"score": 5,
|
||||||
|
"maximumScore": 6
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "IntegerList",
|
||||||
|
"fieldId": 4792,
|
||||||
|
"value": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Guid",
|
||||||
|
"fieldId": 4801,
|
||||||
|
"value": "2c1af5b1-0f90-4378-b9a5-8b7e22f2bc84"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GuidList",
|
||||||
|
"fieldId": 4802,
|
||||||
|
"value": [
|
||||||
|
"71afe161-34f9-49d0-b45e-968b764c884c",
|
||||||
|
"d40a74dd-abb5-4fbb-82c0-5766e871e2a4"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AttachmentList",
|
||||||
|
"fieldId": 4806,
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"fileId": 909,
|
||||||
|
"fileName": "test-attachment.txt",
|
||||||
|
"notes": "This is a test",
|
||||||
|
"storageLocation": "Internal"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "TimeSpan",
|
||||||
|
"fieldId": 4811,
|
||||||
|
"value": {
|
||||||
|
"quantity": 10,
|
||||||
|
"increment": "Minutes",
|
||||||
|
"recurrence": "None"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "StringList",
|
||||||
|
"fieldId": 4999,
|
||||||
|
"value": [
|
||||||
|
"list_value_1",
|
||||||
|
"list_value_2"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "FileList",
|
||||||
|
"fieldId": 4807,
|
||||||
|
"value": [
|
||||||
|
910,
|
||||||
|
911,
|
||||||
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,10 @@ curl --location 'https://api.onspring.com/Records/appId/195' \
|
|||||||
```csharp
|
```csharp
|
||||||
using Onspring.API.SDK;
|
using Onspring.API.SDK;
|
||||||
|
|
||||||
const string baseUrl = "https://api.onspring.com/";
|
var onspringClient = new OnspringClient(
|
||||||
const string apiKey = "000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000";
|
config.BaseUrl,
|
||||||
var onspringClient = new OnspringClient(baseUrl, apiKey);
|
config.ApiKey
|
||||||
|
);
|
||||||
|
|
||||||
var apps = await onspringClient.GetAppsAsync();
|
var apps = await onspringClient.GetAppsAsync();
|
||||||
foreach (App app in apps)
|
foreach (App app in apps)
|
||||||
|
|||||||
Reference in New Issue
Block a user