You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-25 22:12:29 +02:00
63 lines
1.6 KiB
Plaintext
Vendored
63 lines
1.6 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 1
|
|
description: Generate image block and other functions to work with Slack in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Slack]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Generate image block
|
|
Generates a block with an image to add to the message block array
|
|
|
|
|
|
|
|
`Function GenerateImageBlock(Val URL, Val AlternateText = "") Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| URL | --picture | String | ✔ | Image URL |
|
|
| AlternateText | --alt | String | ✖ | Alternate text of the image |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Image block
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Image = "https://hut.openintegrations.dev/test_data/picture.jpg";
|
|
|
|
Result = OPI_Slack.GenerateImageBlock(Image, "Image");
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint slack GenerateImageBlock \
|
|
--picture "https://hut.openintegrations.dev/test_data/picture.jpg" \
|
|
--alt "Image"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint slack GenerateImageBlock ^
|
|
--picture "https://hut.openintegrations.dev/test_data/picture.jpg" ^
|
|
--alt "Image"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"type": "image",
|
|
"image_url": "https://hut.openintegrations.dev/test_data/picture.jpg",
|
|
"alt_text": "Image"
|
|
}
|
|
```
|