1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-07 23:03:08 +02:00
Files
OpenIntegrations/docs/en/md/Yandex_Disk/Manage-public-access/Get-public-object.mdx
Vitaly the Alpaca (bot) 60ddd5e71e Main build (Jenkins)
2025-05-21 10:35:46 +03:00

91 lines
3.2 KiB
Plaintext
Vendored

---
sidebar_position: 4
description: Get public object and other functions to work with Yandex Disk 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, Yandex Disk]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get public object
Gets information about the published object by its URL
`Function GetPublicObject(Val Token, Val URL, Val Count = 0, Val OffsetFromStart = 0) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| URL | --url | String | ✔ | Object address |
| Count | --amount | Number | ✖ | Number of returned nested objects (for catalog) |
| OffsetFromStart | --offset | Number | ✖ | Offset for getting nested objects not from the beginning of the list |
Returns: Map Of KeyAndValue - serialized JSON response from Yandex
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
URL = "https://yadi.sk/i/AB5DEDZMC35Vvg";
Result = OPI_YandexDisk.GetPublicObject(Token, URL);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint yadisk GetPublicObject \
--token "***" \
--url "https://yadi.sk/i/pDSjBE4GRXFnIA"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint yadisk GetPublicObject ^
--token "***" ^
--url "https://yadi.sk/i/pDSjBE4GRXFnIA"
```
</TabItem>
</Tabs>
```json title="Result"
{
"antivirus_status": "clean",
"public_key": "Zgug7716lOoPjW/yVHq7fCMf2VsHEqpvymRw7rxCkLG46AH97K0C1XZAECLVSaR1q/J6bpmRyOJonT3VoXnDag==",
"public_url": "https://yadi.sk/d/p1LRMjbJRWmI6w",
"views_count": 0,
"exif": {},
"created": "2024-10-09T09:10:44+03:00",
"type": "file",
"resource_id": "1573541518:15116e358f7727f9590f66b5967cae42c4134b5e8dafc5a4acba41a51258d715",
"modified": "2024-10-09T09:10:44+03:00",
"size": 2114023,
"comment_ids": {
"private_resource": "1573541518:15116e358f7727f9590f66b5967cae42c4134b5e8dafc5a4acba41a51258d715",
"public_resource": "1573541518:15116e358f7727f9590f66b5967cae42c4134b5e8dafc5a4acba41a51258d715"
},
"mime_type": "multipart",
"file": "https://downloader.disk.yandex.ru/disk/fbda17d6fbea3f6b907b20696acaf01c59fab28ca9380c8546090b100a43bfcd/670656b9/gwThwhLBKYvLhQCNnqAHikawF6ofeh69S2Q-9g1T5IGPQ-vmmg5ho0UNlym1cYvMYt55yWUwrNHLEwnJN27VGg%3D%3D?uid=0&filename=c799f944-a1e1-460c-b167-369776aec80b.png&disposition=attachment&hash=&limit=0&content_type=multipart&owner_uid=0&fsize=2114023&hid=03d7263840468e281bd0b238a26e7d0d&media_type=image&tknv=v2&etag=9e0176f87f6565a22f78e0f9b39a4d78",
"path": "/",
"owner": {
"login": "bayselonarrend",
"display_name": "bayselonarrend",
"uid": "1573541518"
},
"media_type": "image",
"sha256": "89f8eb42a35208a17c85036e17237b0aa0657e1841efa6171dc5acbc0dea9e18",
"revision": 1728454264539399,
"md5": "9e0176f87f6565a22f78e0f9b39a4d78",
"name": "c799f944-a1e1-460c-b167-369776aec80b.png"
}
```