{"id":13431529,"url":"https://github.com/amweiss/dark-sky-core","last_synced_at":"2026-01-14T04:01:12.626Z","repository":{"id":71197613,"uuid":"68946541","full_name":"amweiss/dark-sky-core","owner":"amweiss","description":"A .NET Standard Library for using the Dark Sky API.","archived":true,"fork":false,"pushed_at":"2020-04-01T00:29:34.000Z","size":355,"stargazers_count":54,"open_issues_count":0,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-22T10:55:31.374Z","etag":null,"topics":["dark-sky","netcore","netstandard","nuget"],"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/amweiss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-22T17:43:29.000Z","updated_at":"2024-04-29T18:37:20.000Z","dependencies_parsed_at":"2023-06-08T23:30:33.870Z","dependency_job_id":null,"html_url":"https://github.com/amweiss/dark-sky-core","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/amweiss/dark-sky-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amweiss%2Fdark-sky-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amweiss%2Fdark-sky-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amweiss%2Fdark-sky-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amweiss%2Fdark-sky-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amweiss","download_url":"https://codeload.github.com/amweiss/dark-sky-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amweiss%2Fdark-sky-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dark-sky","netcore","netstandard","nuget"],"created_at":"2024-07-31T02:01:03.841Z","updated_at":"2026-01-14T04:01:12.612Z","avatar_url":"https://github.com/amweiss.png","language":"C#","funding_links":[],"categories":["Frameworks, Libraries and Tools","SDKs","框架, 库和工具"],"sub_categories":["SDKs","开发工具包SDKs"],"readme":"# ARCHIVED: [Apple has purchased Dark Sky and is shutting down the API, so I'm no longer supporting this.](https://blog.darksky.net/dark-sky-has-a-new-home/)\n\n\n# Dark Sky Core\n\n[![NuGet](https://img.shields.io/nuget/v/DarkSkyCore.svg?maxAge=2592000)](https://www.nuget.org/packages/DarkSkyCore) [![Build Status](https://dev.azure.com/amweiss/dark-sky-core/_apis/build/status/dark-sky-core-CI)](https://dev.azure.com/amweiss/dark-sky-core/_build/latest?definitionId=5) [![codecov](https://codecov.io/gh/amweiss/dark-sky-core/branch/master/graph/badge.svg)](https://codecov.io/gh/amweiss/dark-sky-core)\n\nA .NET Standard Library for using the [Dark Sky API](https://darksky.net/dev/docs).\n\n## Usage\n\nThe main class is [`DarkSkyService`](https://github.com/amweiss/dark-sky-core/blob/master/src/Services/DarkSkyService.cs). When using it you will need provide your API key after [signing up](https://darksky.net/dev/) for a dev account.\nYou can also provide an implementations of [`IHttpClient`](https://github.com/amweiss/dark-sky-core/blob/master/src/Services/IHttpClient.cs) and [`IJsonSerializerService`](https://github.com/amweiss/dark-sky-core/blob/master/src/Services/IJsonSerializerService.cs) if you want to replace the default [`ZipHttpClient`](https://github.com/amweiss/dark-sky-core/blob/master/src/Services/ZipHttpClient.cs) and [`JsonNetJsonSerializerService`](https://github.com/amweiss/dark-sky-core/blob/master/src/Services/JsonNetJsonSerializerService.cs)\nfor testing or other purposes.\n\nOnce you have an instance of the class, use `GetForecast` to use the API. The method by default is a [forecast](https://darksky.net/dev/docs/forecast) request.\nIf you specify a value for `ForecastDateTime` in an `OptionalParameters` instance it will become a [time machine](https://darksky.net/dev/docs/time-machine) request.\n\nThe responses all take the form of a [CamelCase](https://en.wikipedia.org/wiki/PascalCase) version of the [Dark Sky Response](https://darksky.net/dev/docs/response) in `DarkSkyResponse`.\nThis includes the [headers](https://darksky.net/dev/docs/response#response) and properties for the required text and link to use based on the [Terms of Service](https://darksky.net/dev/docs/terms).\n\n```csharp\nvar darkSky = new DarkSky.Services.DarkSkyService(apiKey);\nvar forecast = await darkSky.GetForecast(42.915, -78.741);\n\nif (forecast?.IsSuccessStatus == true)\n{\n    Console.WriteLine(forecast.Response.Currently.Summary);\n}\nelse\n{\n    Console.WriteLine(\"No current weather data\");\n}\nConsole.WriteLine(forecast.AttributionLine);\nConsole.WriteLine(forecast.DataSource);\n```\n\nYou can see more examples of usage in the [integration tests](https://github.com/amweiss/dark-sky-core/blob/master/tests/IntegrationTests/Services/DarkSkyServiceIntegrationTests.cs).\n\n## Additional Information\n\n[Code of Conduct](CODE_OF_CONDUCT.md) and [Contributing Guidelines](CONTRIBUTING.md) for the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famweiss%2Fdark-sky-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famweiss%2Fdark-sky-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famweiss%2Fdark-sky-core/lists"}