{"id":21811184,"url":"https://github.com/mathieumack/ckan.netclient","last_synced_at":"2026-05-06T12:41:01.289Z","repository":{"id":54560966,"uuid":"516649298","full_name":"mathieumack/CKan.NetClient","owner":"mathieumack","description":"Unoficial .net client for CKAN API","archived":false,"fork":false,"pushed_at":"2023-01-13T14:49:22.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T05:41:07.664Z","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/mathieumack.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":"2022-07-22T07:14:01.000Z","updated_at":"2022-08-08T11:57:04.000Z","dependencies_parsed_at":"2023-02-09T16:00:49.178Z","dependency_job_id":null,"html_url":"https://github.com/mathieumack/CKan.NetClient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieumack%2FCKan.NetClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieumack%2FCKan.NetClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieumack%2FCKan.NetClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieumack%2FCKan.NetClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathieumack","download_url":"https://codeload.github.com/mathieumack/CKan.NetClient/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244767795,"owners_count":20507110,"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-27T13:43:39.817Z","updated_at":"2026-05-06T12:41:01.254Z","avatar_url":"https://github.com/mathieumack.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CKan.NetClient\nThis library let you to interact with a CKan server APIs with dedicated clients.\n\n==========\n\n# IC\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=mathieumack_CKan.NetClient\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=mathieumack_CKan.NetClient)\n[![.NET](https://github.com/mathieumack/CKan.NetClient/actions/workflows/ci.yml/badge.svg)](https://github.com/mathieumack/CKan.NetClient/actions/workflows/ci.yml)\n[![NuGet package](https://buildstats.info/nuget/CKan.NetClient.Unofficial?includePreReleases=true)](https://nuget.org/packages/CKan.NetClient.Unofficial)\n\n# Onboarding Instructions \n\n## Installation\n\n1. Add nuget package:  \n\n\u003e Install-Package CKan.NetClient.Unoficial\n\n2. CI configuration. In your startup file, you must register an HttpClient by using the HttpClientFactory and next register the custom CKan client by calling the AddCKanClient method.\n\n```c#\nprivate void Register(this IServiceCollection services)\n{\n    // Define the baseUri of your organization :\n    var baseUri = \"https://sample.com/ckan\";\n\n    // Register the HttpClientFactory :\n    services.AddHttpClient()\n\n    // Register the CKanClient object :\n    services.AddCKanClient(baseUri);\n}\n```\n\n\u003e If you have a named HttpClient, you can use it. \nEx : You can use it to mock Http calls :\n\n```c#\nprivate void Register(this IServiceCollection services)\n{\n    // Register the HttpClientFactory :\n    services.AddHttpClient(\"customName\")\n                .ConfigurePrimaryHttpMessageHandler(() =\u003e\n                {\n                    // custom handler\n                });\n\n    // Register the CKanClient object with the named http client\n    services.AddCKanClient(baseUri, \"customName\");\n}\n```\n\n3. Now in your application you can use the CKanClient object from the DI or directly from the service provider : \n\n```c#\npublic CkanClient GetClient(IServiceProvider serviceProvider)\n{\n    return serviceProvider.GetRequiredService\u003cCKanClient\u003e();\n}\n\npublic class MyHttpController\n{\n    private readonly CkanClient client;\n\n    public MyHttpController(CkanClient client)\n    {\n        this.client = client;\n    }\n}\n```\n\n## API calls\nEach API has his own client that let you to read and manipulate datas.\nEach API is linked to an interface named : I\\\u003cApi name\\\u003eClient.\n\nEx for groups :\n\n```c#\npublic IGroupsClient GetGroupsClient(CkanClient client)\n{\n    return serviceProvider.GetClient\u003cIGroupsClient\u003e();\n}\n```\n\nThis interface let you to read groups, get group details, ...\n\n### List of available clients :\n\n* Groups : IGroupsClient\n* Organizations : IOrganizationsClient\n* Packages : IPackagesClient\n* Tags : ITagsClient\n\n### Common supported functions :\n\nOnly read operations are avaiable yet. But more functions will be developped soon. Do not hesitate to participate.\n\n# Documentation : I want more\n\nDo not hesitate to check unit tests on the solution. It's a good way to check client calls and samples.\n\nDo not hesitate to contribute.\n\n\n# Support / Contribute\n\u003e If you have any questions, problems or suggestions, create an issue or fork the project and create a Pull Request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieumack%2Fckan.netclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathieumack%2Fckan.netclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieumack%2Fckan.netclient/lists"}