module

YandexDisk

A Yandex.Disk SDK for Crystal.

Client wraps the whole REST API — metadata and listings, directories, copy/move/delete, upload and download, publishing, custom properties, the Trash, and the background operations the API starts for work it cannot finish inline. It retries transient failures on its own and is safe to share between fibers.

require "yandex-disk"

client = YandexDisk::Client.new(ENV["YANDEX_DISK_TOKEN"])

client.mkdir_p("disk:/reports/2026")
client.upload("chart.png", "disk:/reports/2026/chart.png")
puts client.publish("disk:/reports/2026/chart.png").public_url

Built on top of it, and optional: Uploader for chunked resumable transfers of large files, and Syncer for mirroring local directories onto the Disk with checksum-based skipping and retention — the engine behind the bundled yandex-disk-sync binary.

Constants

VERSION = {{ (`shards version /tmp/tmp.iNeEOg/src/src/yandex-disk`).chomp.stringify }}

Nested types