{"id":13509459,"url":"https://github.com/techgaun/darkskyx","last_synced_at":"2025-10-11T02:12:05.246Z","repository":{"id":57488169,"uuid":"69844858","full_name":"techgaun/darkskyx","owner":"techgaun","description":"A Darksky.net (formerly forecast.io) weather API client for Elixir","archived":false,"fork":false,"pushed_at":"2020-04-12T23:38:10.000Z","size":70,"stargazers_count":12,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-23T18:42:11.354Z","etag":null,"topics":["darksky","elixir","forecast","weather"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techgaun.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":"2016-10-03T06:00:28.000Z","updated_at":"2024-07-15T19:47:02.000Z","dependencies_parsed_at":"2022-08-29T15:01:18.985Z","dependency_job_id":null,"html_url":"https://github.com/techgaun/darkskyx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techgaun/darkskyx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fdarkskyx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fdarkskyx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fdarkskyx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fdarkskyx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techgaun","download_url":"https://codeload.github.com/techgaun/darkskyx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fdarkskyx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278703585,"owners_count":26031204,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"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":["darksky","elixir","forecast","weather"],"created_at":"2024-08-01T02:01:08.070Z","updated_at":"2025-10-11T02:12:05.227Z","avatar_url":"https://github.com/techgaun.png","language":"Elixir","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"# Darkskyx\n\n[![Build Status](https://semaphoreci.com/api/v1/techgaun/darkskyx/branches/master/badge.svg)](https://semaphoreci.com/techgaun/darkskyx) [![Hex version](https://img.shields.io/hexpm/v/darkskyx.svg \"Hex version\")](https://hex.pm/packages/darkskyx) ![Hex downloads](https://img.shields.io/hexpm/dt/darkskyx.svg \"Hex downloads\")\n\n\u003e A Darksky.net weather api client for Elixir\n\nAs of March 31, 2020, Darksky has been [acquired by Apple](https://blog.darksky.net/) and the API will continue to function through the end of 2021.\n\n## Installation\n\nThe package can be installed as:\n\nAdd `darkskyx` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:darkskyx, \"~\u003e 1.0\"}]\nend\n```\n\nEnsure `darkskyx` is started before your application:\n\n```elixir\ndef application do\n  [applications: [:darkskyx]]\nend\n```\n\n## Usage\n\nYou can use darkskyx to perform forecast as well as time machine request. You will need to configure the darksky api key properly.\n\n### configuration\n\nThe simplest would be to set darksky api key as below:\n\n```shell\nexport DARKSKY_API_KEY=\u003capi_key\u003e\n```\n\nNow, in your config.exs (or environment specific configuration), add the config block to configure Darkskyx. You can pass keyword list of `units`, `lang`, `excludes` and `extends` for the `defaults` config block which will be used to override the global default configuration. The default configuration is to use `units: auto` and `lang: en`. On top of the default configuration, you can also override the default configuration per request by passing the `%Darkskyx{}` struct configured to your liking.\n\n```elixir\nconfig :darkskyx, api_key: System.get_env(\"DARKSKY_API_KEY\"),\n  defaults: [\n    units: \"us\",\n    lang: \"en\"\n  ]\n```\n\n### Examples\n\n```elixir\nDarkskyx.forecast(41.032, -94.234)\n\nDarkskyx.forecast(41.043, -93.23432, %Darkskyx{lang: \"ar\"})\n\nDarkskyx.forecast(41.032, -94.234, %Darkskyx{exclude: \"daily,hourly\"})\n\nDarkskyx.time_machine(41.043, -93.23432, 13432423)\n\nDarkskyx.time_machine(41.043, -93.23432, 13432423, %Darkskyx{lang: \"ar\", units: \"si\"})\n\nDarkskyx.current(37, -94)\n\nDarkskyx.current(37, -94, %Darkskyx{lang: \"ar\"})\n```\n\nThis package only performs API call and asks consumer of this package\nto perform things such as handling rate-limiting.\n\n### Change on v1.0\n\nAll the raw api calls except `Darkskyx.current` and `Darkskyx.forecast`\nnow return headers for success calls like: `{:ok, body, headers}`\nThis gives flexibility for API consumer to handle things such as\nrate limiting based on the headers.\n\n## Author\n\n- [Samar Acharya](https://github.com/techgaun)\n\n## License\n\n- See [License](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechgaun%2Fdarkskyx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechgaun%2Fdarkskyx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechgaun%2Fdarkskyx/lists"}