You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-25 22:12:29 +02:00
105 lines
2.8 KiB
Plaintext
Vendored
105 lines
2.8 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 3
|
|
description: Get file data 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';
|
|
|
|
# Get file data
|
|
Gets information about the file
|
|
|
|
|
|
|
|
`Function GetFileData(Val Token, Val FileID) Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Token | --token | String | ✔ | Bot token |
|
|
| FileID | --fileid | String | ✔ | File identifier |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Slack
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "xoxb-6965308400114-696804637...";
|
|
FileID = "F09M9SSDMM5";
|
|
|
|
Result = OPI_Slack.GetFileData(Token, FileID);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint slack GetFileData \
|
|
--token "***" \
|
|
--fileid "F09MFCE1U4Q"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint slack GetFileData ^
|
|
--token "***" ^
|
|
--fileid "F09MFCE1U4Q"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"ok": true,
|
|
"file": {
|
|
"id": "F09MFCE1U4Q",
|
|
"created": 1760521348,
|
|
"timestamp": 1760521348,
|
|
"name": "megadoc.docx",
|
|
"title": "NewFile",
|
|
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
"filetype": "docx",
|
|
"pretty_type": "Word Document",
|
|
"user": "U06UG1CAYH2",
|
|
"user_team": "T06UD92BS3C",
|
|
"editable": false,
|
|
"size": 24069,
|
|
"mode": "hosted",
|
|
"is_external": false,
|
|
"external_type": "",
|
|
"is_public": false,
|
|
"public_url_shared": false,
|
|
"display_as_bot": false,
|
|
"username": "",
|
|
"url_private": "https://files.slack.com/files-pri/T06UD92BS3C-F09MFCE1U4Q/megadoc.docx",
|
|
"url_private_download": "https://files.slack.com/files-pri/T06UD92BS3C-F09MFCE1U4Q/download/megadoc.docx",
|
|
"media_display_type": "unknown",
|
|
"converted_pdf": "https://files.slack.com/files-tmb/T06UD92BS3C-F09MFCE1U4Q-a5f1f270b6/megadoc_converted.pdf",
|
|
"thumb_pdf": "https://files.slack.com/files-tmb/T06UD92BS3C-F09MFCE1U4Q-a5f1f270b6/megadoc_thumb_pdf.png",
|
|
"thumb_pdf_w": 909,
|
|
"thumb_pdf_h": 1286,
|
|
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F09MFCE1U4Q/megadoc.docx",
|
|
"permalink_public": "https://slack-files.com/T06UD92BS3C-F09MFCE1U4Q-0d45fbe1c2",
|
|
"is_starred": false,
|
|
"shares": {},
|
|
"channels": [],
|
|
"groups": [],
|
|
"ims": [],
|
|
"has_more_shares": false,
|
|
"has_rich_preview": false,
|
|
"file_access": "visible",
|
|
"comments_count": 0
|
|
},
|
|
"comments": [],
|
|
"response_metadata": {
|
|
"next_cursor": ""
|
|
}
|
|
}
|
|
```
|