darkskyx alternatives and similar packages
Based on the "Third Party APIs" category.
Alternatively, view darkskyx alternatives based on common mentions on social networks and blogs.
-
MongoosePush
MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS. -
sparkpost
SparkPost client library for Elixir https://developers.sparkpost.com -
elixtagram
:camera: Instagram API client for the Elixir language (elixir-lang) -
google_sheets
Elixir library for fetching Google Spreadsheet data in CSV format -
pay_pal
:money_with_wings: PayPal REST API client for the Elixir language (elixir-lang) -
amazon_product_advertising_client
An Amazon Product Advertising API client for Elixir -
cashier
Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP -
elixir_ipfs_api
The Elixir library that is used to communicate with the IPFS REST endpoint.
Static code analysis for 29 languages.
Do you think we are missing an alternative of darkskyx or a related project?
README
Darkskyx
A Darksky.net weather api client for Elixir
As of March 31, 2020, Darksky has been acquired by Apple and the API will continue to function through the end of 2021.
Installation
The package can be installed as:
Add darkskyx
to your list of dependencies in mix.exs
:
def deps do
[{:darkskyx, "~> 1.0"}]
end
Ensure darkskyx
is started before your application:
def application do
[applications: [:darkskyx]]
end
Usage
You can use darkskyx to perform forecast as well as time machine request. You will need to configure the darksky api key properly.
configuration
The simplest would be to set darksky api key as below:
export DARKSKY_API_KEY=<api_key>
Now, 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.
config :darkskyx, api_key: System.get_env("DARKSKY_API_KEY"),
defaults: [
units: "us",
lang: "en"
]
Examples
Darkskyx.forecast(41.032, -94.234)
Darkskyx.forecast(41.043, -93.23432, %Darkskyx{lang: "ar"})
Darkskyx.forecast(41.032, -94.234, %Darkskyx{exclude: "daily,hourly"})
Darkskyx.time_machine(41.043, -93.23432, 13432423)
Darkskyx.time_machine(41.043, -93.23432, 13432423, %Darkskyx{lang: "ar", units: "si"})
Darkskyx.current(37, -94)
Darkskyx.current(37, -94, %Darkskyx{lang: "ar"})
This package only performs API call and asks consumer of this package to perform things such as handling rate-limiting.
Change on v1.0
All the raw api calls except Darkskyx.current
and Darkskyx.forecast
now return headers for success calls like: {:ok, body, headers}
This gives flexibility for API consumer to handle things such as
rate limiting based on the headers.
Author
License
- See [License](LICENSE) for more details.
*Note that all licence references and agreements mentioned in the darkskyx README section above
are relevant to that project's source code only.