2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 6
|
|
|
|
---
|
|
|
|
|
|
|
|
# Get download link
|
|
|
|
Gets a download link for the file
|
|
|
|
|
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
`Function GetDownloadLink(Val Token, Val Path) Export`
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| Path | --path | String | Path to the file for downloading |
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Yandex
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-07-10 13:05:58 +02:00
|
|
|
<br/>
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
```bsl title="Code example"
|
2024-08-14 15:14:55 +02:00
|
|
|
Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
|
2024-09-10 12:48:11 +02:00
|
|
|
Path = "/ced52016-2220-4e04-aa8b-a6fc063d165e.png";
|
2024-08-14 15:14:55 +02:00
|
|
|
|
|
|
|
Result = OPI_YandexDisk.GetDownloadLink(Token, Path);
|
2024-06-05 12:19:46 +02:00
|
|
|
```
|
2024-08-13 14:52:26 +02:00
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 14:52:26 +02:00
|
|
|
|
|
|
|
oint yadisk GetDownloadLink --token "y0_AgAAAABdylaOAA..." --path "/Alpaca.png"
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-08-14 08:06:31 +02:00
|
|
|
{
|
2024-08-13 14:52:26 +02:00
|
|
|
"templated": false,
|
|
|
|
"method": "GET",
|
|
|
|
"href": "https://downloader.disk.yandex.ru/disk/5e035e14f3580573be69477a0a5a41a598227875d7c471604e386ee2dcfc7067/65c62a93/gwThwhLBKYvLhQCNnqAHis09lIY3JS6kMxocI4drJ-uZelc6zzgdG8REX8G87z9KG45VhprQarmCtb_OEKbojQ%3D%3D?uid=1573541518&filename=%D0%90%D0%BB%D1%8C%D0%BF%D0%B0%D0%BA%D0%B0.png&disposition=attachment&hash=&limit=0&content_type=image%2Fpng&owner_uid=1573541518&fsize=440431&hid=0e9b208e1aea0dbd58b4b43ccdc3ad5a&media_type=image&tknv=v2&etag=8d7bf7d7ee61113f9044f3a28496e458"
|
|
|
|
}
|
2024-06-05 12:19:46 +02:00
|
|
|
```
|