Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.26 KB

README.md

File metadata and controls

47 lines (31 loc) · 1.26 KB

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)
}