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
|
||||
- number
|
||||
- `number`
|
||||
- The id of the app or survey.
|
||||
|
||||
---
|
||||
|
||||
- recordId
|
||||
- number
|
||||
- `number`
|
||||
- The id of the record.
|
||||
|
||||
---
|
||||
|
||||
- fieldData
|
||||
- object[]
|
||||
- `object[]`
|
||||
- An array of [Field Value](#field-values) objects.
|
||||
|
||||
{% /table %}
|
||||
|
||||
@@ -13,19 +13,19 @@ These are objects representing a field value in a record. They will comprise the
|
||||
---
|
||||
|
||||
- type
|
||||
- string
|
||||
- `string`
|
||||
- The type of the field.
|
||||
|
||||
---
|
||||
|
||||
- fieldId
|
||||
- number
|
||||
- `number`
|
||||
- The id of the field.
|
||||
|
||||
---
|
||||
|
||||
- value
|
||||
- object
|
||||
- `object`
|
||||
- The value of the field.
|
||||
|
||||
{% /table %}
|
||||
@@ -123,27 +123,33 @@ These are objects representing a field value in a record. They will comprise the
|
||||
---
|
||||
|
||||
- quantity
|
||||
- number
|
||||
- `number`
|
||||
- The number of the specified increment.
|
||||
|
||||
---
|
||||
|
||||
- increment
|
||||
- string
|
||||
- `string`
|
||||
- The increment of time. Can be one of the following values: `Years`, `Months`, `Days`, `Hours`, `Minutes`, `Seconds`.
|
||||
|
||||
---
|
||||
|
||||
- recurrence
|
||||
- string
|
||||
- `string`
|
||||
- The recurrence of the time span. Can be one of the following values: `None`, `EndByDate`, `EndAfterOccurrences`.
|
||||
|
||||
---
|
||||
|
||||
- endByDate
|
||||
- string
|
||||
- `string`
|
||||
- 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 %}
|
||||
|
||||
### Attachment Value {% #attachment-value %}
|
||||
@@ -157,25 +163,59 @@ These are objects representing a field value in a record. They will comprise the
|
||||
---
|
||||
|
||||
- fileId
|
||||
- number
|
||||
- `number`
|
||||
- The id of the file.
|
||||
|
||||
---
|
||||
|
||||
- fileName
|
||||
- string
|
||||
- `string`
|
||||
- The name of the file.
|
||||
|
||||
---
|
||||
|
||||
- notes
|
||||
- string
|
||||
- `string`
|
||||
- The notes for the attachment.
|
||||
|
||||
---
|
||||
|
||||
- storageLocation
|
||||
- string
|
||||
- `string`
|
||||
- The storage location of the file. Can be one of the following values: `Internal`, `OneDrive`, `GoogleDrive`.
|
||||
|
||||
{% /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
|
||||
|
||||
{% code heading="FIELD VALUE" defaultLanguage="json" %}
|
||||
{% code heading="FIELD VALUES" defaultLanguage="json" %}
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "Integer",
|
||||
"fieldId": 6976,
|
||||
"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
|
||||
using Onspring.API.SDK;
|
||||
|
||||
const string baseUrl = "https://api.onspring.com/";
|
||||
const string apiKey = "000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000";
|
||||
var onspringClient = new OnspringClient(baseUrl, apiKey);
|
||||
var onspringClient = new OnspringClient(
|
||||
config.BaseUrl,
|
||||
config.ApiKey
|
||||
);
|
||||
|
||||
var apps = await onspringClient.GetAppsAsync();
|
||||
foreach (App app in apps)
|
||||
|
||||
Reference in New Issue
Block a user