Download the PHP package philwc/dark-sky without Composer

On this page you can find all versions of the php package philwc/dark-sky. 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 dark-sky

Dark Sky API Client

A strongly typed simple client to talk to the Dark Sky API.

Build Status

Getting Started

To get started, you will need to get a secret key from Dark Sky: https://darksky.net/dev/account.

Client Adapters

This package makes use of HTTP adapters to connect to the API. Two are included out of the box, a Guzzle adapter and a Simple adapter (using file_get_contents). If you have specialised connection needs, simply implement the ClientAdapterInterface and pass to the client factory.

If a ClientAdapter is not specified, the package will make use of the GuzzleAdapter if Guzzle is available, falling back to the SimpleAdapter (using file_get_contents) if not.

If a guzzle adapter is provided (or the implemented ClientAdapterInterface supports it), multiple requests will be made concurrently.

Usage

Install the package using composer:

Simple Usage

Client

To use the Client use the ClientFactory:

Advanced Usage

It is possible to pass both a PSR-16 cache adapter, as well as a PSR-3 logger into the ClientFactory:

When creating your request, you can pass a parameters key to customise the values you get back from DarkSky.

Caching

This package is also able to make use of a PSR-16 caching adapter to cache calls from the API. Simply pass a relevant cache service (see https://packagist.org/providers/psr/simple-cache-implementation) to the client factory to use. No caching is provided out of the box.

It is possible to set the TTL for the cache independently for each request type. On the client, use setForecastTTL or setTimeMachineTTL to specify. By default, the following TTLs are set:

Concurrent Requests

It is possible to make concurrent requests to the DarkSky API. Simply create a RequestCollection and pass to retrieve


All versions of dark-sky with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-json Version *
php-ds/php-ds Version ^1.2
beberlei/assert Version ^3.0
guzzlehttp/psr7 Version ^1.4
psr/simple-cache Version ^1.0
psr/log Version ^1.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 philwc/dark-sky contains the following files

Loading the files please wait ....