PHPackages                             lsv/darksky-php-wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lsv/darksky-php-wrapper

ActiveLibrary[API Development](/categories/api)

lsv/darksky-php-wrapper
=======================

Wrapper for darksky.net api

v1.0(6y ago)04MITPHP

Since Jul 20Pushed 6y agoCompare

[ Source](https://github.com/lsv/darksky)[ Packagist](https://packagist.org/packages/lsv/darksky-php-wrapper)[ RSS](/packages/lsv-darksky-php-wrapper/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

Darksky.net API wrapper
-----------------------

[](#darkskynet-api-wrapper)

[![Build Status](https://camo.githubusercontent.com/7bd372790b5ffe5d1bf1c322d5d7f0ec2581834f2f0e38e3381e69112de08e77/68747470733a2f2f7472617669732d63692e6f72672f6c73762f6461726b736b792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lsv/darksky) [![codecov](https://camo.githubusercontent.com/2493c70070b9099f1a4a9c25b205c3ae1ad68cbf3521784cffc54093c7eed12a/68747470733a2f2f636f6465636f762e696f2f67682f6c73762f6461726b736b792f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/lsv/darksky)

PHP Wrapper for [darksky.net](https://darksky.net) weather api.

Supporting

- Forecast
- TimeMachine

### Install

[](#install)

```
composer require lsv/darksky-php-wrapper

```

### Usage

[](#usage)

##### Forecast

[](#forecast)

```
$client = new Symfony\Component\HttpClient\HttpClient();
$apikey = 'your-api-key';
$latitude = 42.3601;
$longitude = -71.0589;

$forecast = new \Lsv\Darksky\Forecast($apikey, $client);
// Set the optional parameters
// See https://darksky.net/dev/docs#forecast-request for possible parameters
$forecast->exclude(['currently']); // Array of blocks to exclude from the call
$forecast->extendHourly(); // Extend hourly forecast to 148 hours
$forecast->language('da'); // Set the language
$forecast->units('si'); // Change the units

$response = $forecast->call($latitude, $longitude);
// $response is now a \Lsv\Darksky\Response\ForecastResponse object

```

##### Timemachine

[](#timemachine)

```
$client = new Symfony\Component\HttpClient\HttpClient();
$apikey = 'your-api-key';
$latitude = 42.3601;
$longitude = -71.0589;
$time = new \DateTime();

$timemachine = new \Lsv\Darksky\Timemachine($apikey, $client);
// Set the optional parameters
// See https://darksky.net/dev/docs#forecast-request for possible parameters
$timemachine->exclude(['currently']); // Array of blocks to exclude from the call
$timemachine->language('da'); // Set the language
$timemachine->units('si'); // Change the units

$response = $timemachine->call($latitude, $longitude, $time);
// $response is now a \Lsv\Darksky\Response\TimemachineResponse object

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2490d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff9304e6a7caa208d631a1529240a97dff2f47dadde7bff153e8a90818047168?d=identicon)[lsv](/maintainers/lsv)

---

Top Contributors

[![lsv](https://avatars.githubusercontent.com/u/20708?v=4)](https://github.com/lsv "lsv (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lsv-darksky-php-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/lsv-darksky-php-wrapper/health.svg)](https://phpackages.com/packages/lsv-darksky-php-wrapper)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[api-platform/symfony

Symfony API Platform integration

323.2M67](/packages/api-platform-symfony)[api-platform/serializer

API Platform core Serializer

223.4M31](/packages/api-platform-serializer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
