Download the PHP package lawnstarter/laravel-darksky without Composer

On this page you can find all versions of the php package lawnstarter/laravel-darksky. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-darksky

Laravel DarkSky

This provides a Laravel style wrapper for the DarkSky api and simplifies writing tests against ever changing weather data. 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

DarkSky & Testing

To simplyfiy testing the static method to force the response to be a certain payload without actually hitting the DarkSky API was added.

When this value is not null, the DarkSky wrapper will always return this data. If the value is null, the DarkSky API will be queried in real-time. To simplify testing further, sample test responses are available for you to use in your test classes

Method Sample Payload
See Sample Forecast JSON
See Sample Forecast Extended Hourly JSON
See Sample Time Machine JSON

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-darksky with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
guzzlehttp/guzzle Version ~5.3|>=6.0
illuminate/support Version ~5.3|>=6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lawnstarter/laravel-darksky contains the following files

Loading the files please wait ....