{"id":21701201,"url":"https://github.com/russkyc/github-release-downloader","last_synced_at":"2025-04-12T13:35:21.273Z","repository":{"id":205086025,"uuid":"713405617","full_name":"russkyc/github-release-downloader","owner":"russkyc","description":"A small set of classes to download github release assets https://www.nuget.org/packages/GithubReleaseDownloader","archived":false,"fork":false,"pushed_at":"2023-11-02T13:35:23.000Z","size":1832,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-21T08:46:12.966Z","etag":null,"topics":["csharp","dotnet","downloader","github","github-assets","github-assets-downloader","github-client","github-downloader","github-release-assets","github-releases","nuget","toolkit"],"latest_commit_sha":null,"homepage":"","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/russkyc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"russkyc","patreon":"russkyc","custom":["https://paypal.me/jrcmo"]}},"created_at":"2023-11-02T13:07:48.000Z","updated_at":"2024-03-04T13:37:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"2a35846c-1c1a-4761-ae41-db47786a6f11","html_url":"https://github.com/russkyc/github-release-downloader","commit_stats":null,"previous_names":["russkyc/github-release-downloader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russkyc%2Fgithub-release-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russkyc%2Fgithub-release-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russkyc%2Fgithub-release-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russkyc%2Fgithub-release-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/russkyc","download_url":"https://codeload.github.com/russkyc/github-release-downloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226393034,"owners_count":17618008,"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":["csharp","dotnet","downloader","github","github-assets","github-assets-downloader","github-client","github-downloader","github-release-assets","github-releases","nuget","toolkit"],"created_at":"2024-11-25T20:18:31.396Z","updated_at":"2024-11-25T20:18:32.797Z","avatar_url":"https://github.com/russkyc.png","language":"C#","funding_links":["https://github.com/sponsors/russkyc","https://patreon.com/russkyc","https://paypal.me/jrcmo"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\".github/resources/images/github-release-downloader.png\" style=\"width: 100%;\" /\u003e\n\n\u003ch2 align=\"center\"\u003eGithubReleaseDownloader\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.nuget.org/packages/GithubReleaseDownloader\"\u003e\n        \u003cimg src=\"https://img.shields.io/nuget/v/GithubReleaseDownloader?color=1f72de\" alt=\"Nuget\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/-.NET%20Standard%202.0-blueviolet?color=1f72de\u0026label=NET\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/russkyc/github-release-downloader\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues/russkyc/github-release-downloader\" alt=\"\"\u003e\n    \u003c/a\u003e\n\n\u003c/p\u003e\n\n\u003cp style=\"text-align: justify\"\u003e\nIf you just want to download assets with very minimal code, we got you!\nAll you need to know is the public repository name and owner, and you can download release\nassets easily. No need to setup api keys and clients.\n\u003c/p\u003e\n\n\n## Simple console demo\n\n\nI think it's easier to show how it works, here is a simple console demo\nto download assets from the latest release of `fossa-client-desktop`\n\n```csharp\nusing GithubReleaseDownloader;\n\nnamespace ConsoleApp;\n\npublic static class Program\n{\n    public static void Main()\n    {\n        // The owner and repo to download from, and target path\n        var owner = \"libremindsph\";\n        var repo = \"fossa-client-desktop\";\n        var downloadPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);\n\n        // Get last release using .GetLatest(), can substitute with other available methods\n        var release = ReleaseManager.Instance.GetLatest(owner, repo);\n        \n        if (release is null) return;\n        \n        // In this case, we download all assets\n        AssetDownloader.Instance .DownloadAllAssets(release, downloadPath);\n    }\n\n}\n```\n\nAnd done! That easy. If you need to monitor the progress, we also got you covered. just use the `progressChanged`\ncallback.\n\n```csharp\nusing GithubReleaseDownloader;\nusing GithubReleaseDownloader.Entities;\n\nnamespace ConsoleApp;\n\npublic static class Program\n{\n    public static void Main()\n    {\n        \n        // The owner and repo to download from, and target path\n        var owner = \"libremindsph\";\n        var repo = \"fossa-client-desktop\";\n        var downloadPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);\n\n        // Get last release using .GetLatest(), can substitute with other available methods\n        var release = ReleaseManager.Instance.GetLatest(owner, repo);\n        \n        if (release is null) return;\n        \n        // In this case, we download all assets\n        AssetDownloader.Instance.DownloadAllAssets(release,downloadPath, progressChanged: RunOnProgressChanged);\n    }\n\n    // This is being executed when the progress changes\n    private static void RunOnProgressChanged(DownloadInfo downloadInfo)\n    {\n        if (downloadInfo.DownloadPercent == 1.0)\n        {\n            Console.WriteLine($\"Finished downloading: {downloadInfo.Name}\");\n            return;\n        }\n\n        if (downloadInfo.DownloadPercent == 0)\n        {\n            Console.WriteLine($\"Start downloading: {downloadInfo.Name}\");\n            return;\n        }\n        \n        Console.WriteLine($\"Progress({downloadInfo.Name}): {downloadInfo.DownloadPercent:P}\");\n    }\n}\n```\n\n## Installation\n\nNuget Cli `dotnet add package GithubReleaseDownloader --version 1.0.0`\nNuget Link https://www.nuget.org/packages/GithubReleaseDownloader/1.0.0 \n## Available Methods\n\n\n### :star: Release Manager\n\n| **Method**            | **Description**                                     | **Parameters**                                  |\n|-----------------------|-----------------------------------------------------|-------------------------------------------------|\n| **GetWithTag()**      | Gets a release from the repo with the specified tag | string: owner\u003cbr/\u003estring: repo\u003cbr/\u003e string: tag |\n| **GetWithTagAsync()** | Asynchronous overload of `GetWithTag()`             | string: owner\u003cbr/\u003estring: repo\u003cbr/\u003e string: tag |\n| **GetLatest()**       | Gets the latest release from the repo               | string: owner\u003cbr/\u003estring: repo\u003cbr/\u003e             |\n| **GetLatestAsync()**  | Asynchronous overload of `GetLatest()`              | string: owner\u003cbr/\u003estring: repo\u003cbr/\u003e             |\n| **GetAll()**          | Gets all releases from the repo                     | string: owner\u003cbr/\u003estring: repo\u003cbr/\u003e             |\n| **GetAllAsync()**     | Asynchronous overload of `GetAll()`                 | string: owner\u003cbr/\u003estring: repo\u003cbr/\u003e             |\n\n\n### :arrow_down: Asset Downloader\n\nOnly the parameters with an asterisk `*` are required, the rest are optional\n\n| **Method**                 | **Description**                                | **Parameters**                                                                                                              |\n|----------------------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| `DownloadAllAssets()`      | Downloads all release assets                   | `Release`: release*\u003cbr/\u003e`string`: savePath*\u003cbr/\u003e`Action\u003cDownloadInfo\u003e` progressChanged                                      |\n| `DownloadAllAssetsAsync()` | Asynchronous overload of `DownloadAllAssets()` | `Release`: release*\u003cbr/\u003e`string`: savePath*\u003cbr/\u003e`Action\u003cDownloadInfo\u003e` progressChanged                                      |\n| `DownloadAssets()`         | Downloads selected release assets              | `IEnumerable\u003cReleaseAsset\u003e` assets*\u003cbr/\u003e`string` savePath*\u003cbr/\u003e`Action\u003cDownloadInfo\u003e` progressChanged                       |\n| `DownloadAssetsAsync()`    | Asynchronous overload of `DownloadAssets()`    | `IEnumerable\u003cReleaseAsset\u003e` assets*\u003cbr/\u003e`string` savePath*\u003cbr/\u003e`Action\u003cDownloadInfo\u003e` progressChanged                       |\n| `DownloadAsset()`          | Downloads a single release asset               | `IEnumerable\u003cReleaseAsset\u003e` assets*\u003cbr/\u003e`string` savePath*\u003cbr/\u003e`string` fileName\u003cbr/\u003e`Action\u003cDownloadInfo\u003e` progressChanged |\n| `DownloadAssetAsync()`     | Asynchronous overload of `DownloadAsset()`     | `IEnumerable\u003cReleaseAsset\u003e` assets*\u003cbr/\u003e`string` savePath*\u003cbr/\u003e`string` fileName\u003cbr/\u003e`Action\u003cDownloadInfo\u003e` progressChanged |\n\n## Support\n\nI do this freely to help the community :heart:, but supporting this project means I can afford more\ntime to spend in these projects. Who knows, we might be able to create\nsomething even more awesome! Click on the sponsor button in this repository to show some love for this project :heart:\n\n\n## Special Message\nThis project was developed with the help of jetbrains products, thank you [JetBrains](https://www.jetbrains.com/) for supporting this project by providing licences to the JetBrains Suite!\n\n\u003ca href=\"https://www.jetbrains.com/community/opensource/#support\"\u003e\n\u003cimg width=\"200px\" src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png\" alt=\"JetBrains Logo (Main) logo.\"\u003e\n\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frusskyc%2Fgithub-release-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frusskyc%2Fgithub-release-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frusskyc%2Fgithub-release-downloader/lists"}