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
- YandexDisk::APIError
- YandexDisk::AuthError
- YandexDisk::CLI
- YandexDisk::Checksum
- YandexDisk::Client
- YandexDisk::Config
- YandexDisk::ConfigError
- YandexDisk::ConflictError
- YandexDisk::ConnectionPool
- YandexDisk::DiskInfo
- YandexDisk::Error
- YandexDisk::FileAction
- YandexDisk::FileResult
- YandexDisk::FileTooLargeError
- YandexDisk::InsufficientStorageError
- YandexDisk::Link
- YandexDisk::LocalFile
- YandexDisk::NotFoundError
- YandexDisk::Operation
- YandexDisk::OperationFailedError
- YandexDisk::OperationHandle
- YandexDisk::OperationTimeoutError
- YandexDisk::Parse
- YandexDisk::RateLimitError
- YandexDisk::RemotePath
- YandexDisk::Report
- YandexDisk::Resource
- YandexDisk::ResourceList
- YandexDisk::Retention
- YandexDisk::RetentionConfig
- YandexDisk::RetryConfig
- YandexDisk::RetryPolicy
- YandexDisk::Scanner
- YandexDisk::Source
- YandexDisk::Syncer
- YandexDisk::TransportError
- YandexDisk::UploadError
- YandexDisk::Uploader