Skip to content

ilyabrin/disk

Repository files navigation

disk

Yandex.Disk API client (WIP)

REST API Диска

Run Tests GitHub code size in bytes Coverage Status

Install

go get -v github.com/ilyabrin/disk

Using

Set the environment variable:

export YANDEX_DISK_ACCESS_TOKEN=_<your access_token string>_

Working example (errors checks omitted):

func main() {

    client := disk.New() // New("or paste your access token here")

    ctx := context.Background()

    disk, err := client.DiskInfo(ctx)
    if err != nil {
        log.Println(err)
    }

    log.Println(disk)
}