1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-13 11:50:53 +02:00

49 lines
1.0 KiB
Markdown
Raw Normal View History

---
sidebar_position: 4
---
# Create poll
Creates a poll with answer options
2024-07-10 13:58:29 +03:00
`Function CreatePoll(Val Question, Val AnswersArray, Val Image = "", Val Parameters = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Question | --question | String | Poll question |
| AnswersArray | --options | Array of String | Array of answer options |
| Image | --picture | String, BinaryData | Poll image |
| Parameters | --auth | Structure Of String | Authorization JSON or path to .json |
2024-10-09 09:42:00 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from VK
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-08-13 16:47:32 +03:00
Parameters = GetVKParameters();
Question = "What's your favorite color?";
OptionArray = New Array;
OptionArray.Add("Red");
OptionArray.Add("Yellow");
OptionArray.Add("Green");
Result = OPI_VK.CreatePoll(Question, OptionArray, , Parameters);
```
2024-10-15 09:53:37 +03:00
```json title="Result"
2024-08-14 09:06:31 +03:00
{
2024-10-06 16:55:08 +03:00
"response": {
2024-10-09 09:42:00 +03:00
"post_id": 4556
2024-10-06 16:55:08 +03:00
}
}
```