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
1C:Enterprise/OneScript code example
Image = "https://api.athenaeum.digital/test_data/picture.jpg";
Result = OPI_Slack.GenerateImageBlock(Image, "Image");
- Bash
- CMD/Bat
oint slack GenerateImageBlock \
--picture "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg" \
--alt "Image"
oint slack GenerateImageBlock ^
--picture "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg" ^
--alt "Image"
Result
{
"type": "image",
"image_url": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg",
"alt_text": "Image"
}