Download the PHP package naughtonium/laravel-dark-sky without Composer
On this page you can find all versions of the php package naughtonium/laravel-dark-sky. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download naughtonium/laravel-dark-sky
More information about naughtonium/laravel-dark-sky
Files in naughtonium/laravel-dark-sky
Package laravel-dark-sky
Short Description Provides a Wrapper for the DarkSky API
License MIT
Homepage https://github.com/naughtonium/laravel-dark-sky
Informations about the package laravel-dark-sky
Laravel DarkSky
This provides a Laravel style wrapper for the DarkSky api. For more information regarding request and response formats, visit: https://darksky.net/dev/docs
Install
Require this package with composer using the following command:
After updating composer, add the service provider to the providers
array in config/app.php
To register a facade accessor, add the following to config/app.php
aliases
array
Configuration
Add the following line to the .env file:
Usage
For full details of response formats, visit: https://darksky.net/dev/docs/response
Required
location(lat, lon)
Pass in latitude and longitude coordinates for a basic response
Optional Parameters
For full details of optional parameters, visit: https://darksky.net/dev/docs/forecast
excludes([]) / includes([])
Specify which data blocks to exclude/include to reduce data transfer
atTime(t)
Pass in a unix timestamp to get forecast for that time. Note: the timezone is relative to the given location
language(l)
Specify a language for text based responses
units(u)
Specify units for unit based responses
extend()
Extend the "hourly" response from 48 to 168 hours. Note: Does not work if used with an atTime() timestamp. Please see: https://darksky.net/dev/docs/time-machine
Helpers
The following are shorthand helpers to add readability equal to using includes() with only one parameter. Note: only one may be used per query and only temperature specific data is returned
For example, these two statements are the same
Credits
- Jack Naughton
- All Contributors
License
The MIT License (MIT). Please see License File for more information.