2024-10-15 10:50:56 +03:00
|
|
|
---
|
2024-10-15 10:16:04 +03:00
|
|
|
sidebar_position: 8
|
|
|
|
---
|
|
|
|
|
2024-10-15 10:50:56 +03:00
|
|
|
import Tabs from '@theme/Tabs';
|
|
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
|
2024-10-15 10:16:04 +03:00
|
|
|
# Get picture block
|
|
|
|
Make picture block for SendMessage method
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`Function GetPictureBlock(Val Name, Val URL) Export`
|
|
|
|
|
2024-10-15 15:15:47 +03:00
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|
|
|-|-|-|-|-|
|
|
|
|
| Name | --title | String | ✔ | Picture name |
|
|
|
|
| URL | --url | String | ✔ | URL of sending picture |
|
2024-10-15 10:16:04 +03:00
|
|
|
|
|
|
|
|
|
|
|
Returns: Structure - PictureBlock
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
:::tip
|
2024-11-21 13:27:18 +03:00
|
|
|
Blocks at API documentation: [Link](https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=93&CHAPTER_ID=07867)
|
2024-10-15 10:16:04 +03:00
|
|
|
:::
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
2024-10-15 21:15:56 +03:00
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
2024-10-15 10:16:04 +03:00
|
|
|
Name = "Image";
|
|
|
|
URL = "https://api.athenaeum.digital/test_data/picture.jpg";
|
|
|
|
|
|
|
|
Result = OPI_Bitrix24.GetPictureBlock(Name, URL);
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2024-10-20 22:36:03 +03:00
|
|
|
<Tabs>
|
|
|
|
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
|
|
```bash
|
|
|
|
oint bitrix24 GetPictureBlock \
|
2024-10-22 08:59:24 +03:00
|
|
|
--title "Image" \
|
|
|
|
--url "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg"
|
2024-10-20 22:36:03 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
|
|
```batch
|
|
|
|
oint bitrix24 GetPictureBlock ^
|
2024-10-22 08:59:24 +03:00
|
|
|
--title "Image" ^
|
|
|
|
--url "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg"
|
2024-10-20 22:36:03 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
</Tabs>
|
2024-10-15 10:16:04 +03:00
|
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
|
|
|
{
|
|
|
|
"IMAGE": {
|
|
|
|
"NAME": "Image",
|
|
|
|
"LINK": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|