{"id":21873470,"url":"https://github.com/raidenyn/yandexdisk.client","last_synced_at":"2025-06-28T01:36:18.797Z","repository":{"id":2456190,"uuid":"46592596","full_name":"raidenyn/yandexdisk.client","owner":"raidenyn","description":"Yandex Disk API Client for .NET","archived":false,"fork":false,"pushed_at":"2022-09-19T17:39:06.000Z","size":131,"stargazers_count":41,"open_issues_count":6,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-17T07:19:26.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raidenyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-20T23:32:50.000Z","updated_at":"2025-03-29T21:50:25.000Z","dependencies_parsed_at":"2023-01-11T16:10:13.880Z","dependency_job_id":null,"html_url":"https://github.com/raidenyn/yandexdisk.client","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/raidenyn/yandexdisk.client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raidenyn%2Fyandexdisk.client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raidenyn%2Fyandexdisk.client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raidenyn%2Fyandexdisk.client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raidenyn%2Fyandexdisk.client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raidenyn","download_url":"https://codeload.github.com/raidenyn/yandexdisk.client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raidenyn%2Fyandexdisk.client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260704448,"owners_count":23049461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T07:08:10.371Z","updated_at":"2025-06-28T01:36:18.760Z","avatar_url":"https://github.com/raidenyn.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yandex Disk API Client for .NET\n\n[Yandex Disk Rest API](https://tech.yandex.ru/disk/rest/) client library for .NET Standard\n\n[![Build status](https://ci.appveyor.com/api/projects/status/tiranp5ojj9ivfeb/branch/master?svg=true)](https://ci.appveyor.com/project/raidenyn/yandexdisk-client/branch/master)\n\n## How to install\n\nFrom [NuGet](https://www.nuget.org/packages/YandexDisk.Client/) or\n[MyGet](https://www.myget.org/feed/yandexdisk-client)\n```cmd\nPM\u003e Install-Package YandexDisk.Client\n```\n\n## Changes in version 1.3\n- Now the library is supporting .NET Standard 2.0 and available for .NET Core.\n- Removed supporting of .NET 4.0 and 4.5\n\n\n## How to use\n\nExample of uploading file to Yandex Disk\n\n```C#\nasync Task UploadSample()\n{\n  //You should have oauth token from Yandex Passport.\n  //See https://tech.yandex.ru/oauth/\n  string oauthToken = \"\u003ctoken hear\u003e\"\n\n  // Create a client instance\n  IDiskApi diskApi = new DiskHttpApi(oauthToken);\n\n  //Upload file from local\n  await diskApi.Files.UploadFileAsync(path: \"/foo/myfile.txt\",\n                                      overwrite: false,\n                                      localFile: @\"C:\\myfile.txt\",\n                                      cancellationToken: CancellationToken.None);\n}\n```\n\n\nExample of downloading files from Yandex Disk\n\n```C#\nasync Task DownloadAllFilesInFolder(IDiskApi diskApi)\n{\n    //Getting information about folder /foo and all files in it\n    Resource fooResourceDescription = await diskApi.MetaInfo.GetInfoAsync(new ResourceRequest\n                                            {\n                                                Path = \"/foo\", //Folder on Yandex Disk\n                                            }, CancellationToken.None);\n\n    //Getting all files from response\n    IEnumerable\u003cResource\u003e allFilesInFolder =\n        fooResourceDescription.Embedded.Items.Where(item =\u003e item.Type == ResourceType.File);\n\n    //Path to local folder for downloading files\n    string localFolder = @\"C:\\foo\";\n\n    //Run all downloadings in parallel. DiskApi is thread safe.\n    IEnumerable\u003cTask\u003e downloadingTasks =\n        allFilesInFolder.Select(file =\u003e\n          diskApi.Files.DownloadFileAsync(path: file.Path,\n                                          localPath: System.IO.Path.Combine(localFolder, file.Name)));\n\n    //Wait all done\n    await Task.WhenAll(downloadingTasks);\n}\n```\n\n## How to build\nOpen solution src/YandexDisk.Client.sln in Visual Studio 2017 (support C# 7.3 is required). Run build solution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraidenyn%2Fyandexdisk.client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraidenyn%2Fyandexdisk.client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraidenyn%2Fyandexdisk.client/lists"}