PHPackages                             vertigolabs/overcast - 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. vertigolabs/overcast

ActiveLibrary[API Development](/categories/api)

vertigolabs/overcast
====================

An easy to use wrapper for the Dark Sky API (formerly Forecast.io)

1.1.2(9y ago)3059.3k—0%7[1 issues](https://github.com/jaimz22/Overcast/issues)MITPHP

Since Jun 8Pushed 8y ago7 watchersCompare

[ Source](https://github.com/jaimz22/Overcast)[ Packagist](https://packagist.org/packages/vertigolabs/overcast)[ RSS](/packages/vertigolabs-overcast/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (8)Used By (0)

Overcast
========

[](#overcast)

[![SensioLabsInsight](https://camo.githubusercontent.com/10595a30aab89a2d5aaac16de1f2f0739addd723b5109beca055421e6183b2eb/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f34643037366464322d333134642d343039302d613032352d3235393839613736356632352f6269672e706e67)](https://insight.sensiolabs.com/projects/4d076dd2-314d-4090-a025-25989a765f25)

[![Latest Unstable Version](https://camo.githubusercontent.com/c75bb6dd6ca8b1e2eb31bd53c013154eff82965f6a5ae335d857a5128f1de067/68747470733a2f2f706f7365722e707567782e6f72672f7665727469676f6c6162732f6f766572636173742f762f756e737461626c652e737667)](https://packagist.org/packages/vertigolabs/overcast)[![Latest Stable Version](https://camo.githubusercontent.com/25a8cdd4485840a89b06e9fdd4082094d061487cadba1326b5770c6b3df148f8/68747470733a2f2f706f7365722e707567782e6f72672f7665727469676f6c6162732f6f766572636173742f762f737461626c652e737667)](https://packagist.org/packages/vertigolabs/overcast)

[![License](https://camo.githubusercontent.com/aa0b0c8cf4c0da1b1b5cae33fda29e30887e829240465c16d2995ce33ad29ed5/68747470733a2f2f706f7365722e707567782e6f72672f7665727469676f6c6162732f6f766572636173742f6c6963656e73652e737667)](https://packagist.org/packages/vertigolabs/overcast)[![Total Downloads](https://camo.githubusercontent.com/3292d08a114aadac180108b10f0be8a717ef3298e4030c403cdce7b728dcfd74/68747470733a2f2f706f7365722e707567782e6f72672f7665727469676f6c6162732f6f766572636173742f646f776e6c6f6164732e737667)](https://packagist.org/packages/vertigolabs/overcast)

An easy to use wrapper for the [Dark Sky](https://darksky.net/) API (formerly [Forecast.io](https://forecast.io)).

Overcast will query the Dark Sky API for weather information for the longitude and latitude you specify. Additionally you may specify the specific time, past or present.

See the [Dark Sky API documentation](https://darksky.net/dev/docs) for more information.

Installation
------------

[](#installation)

Installation is as simple as using [Composer](http://getcomposer.org/):

```
{
    "require": {
        "vertigolabs/overcast": "dev-master"
    }
}

```

Client Adapters
---------------

[](#client-adapters)

Overcast uses client adapters to connect to the Dark Sky API. This gives you the ability to create your own adapter for whatever HTTP client you'd like to use. This is especially useful for people who have special needs when dealing with retrieving data from third parties (firewalls, proxies, etc)

Overcast comes with two client adapters ready for use, FileGetContentsClientAdapter and GuzzleClientAdapter. You can also create your own by simply implementing the ClientAdapterInterface

By default, you do not have to specify which adapter to use. Overcast will automatically use the best client adapter available. If Guzzle is installed, it will use the GuzzleClientAdaptor, otherwise it will fallback to the FileGetContentsClientAdapter.

If you do wish to specify the client adapter, you'd do this with the second parameter when instancing the Overcast class:

```
$overcast = new \VertigoLabs\Overcast\Overcast('YOUR API KEY', new \VertigoLabs\Overcast\ClientAdapters\FileGetContentsClientAdapter());
// or
$overcast = new \VertigoLabs\Overcast\Overcast('YOUR API KEY', new MyAwesomeClientAdapter());
```

Example
-------

[](#example)

Since the Dark Sky API is simple, Overcast is equally easy to use. Simply create an instance of the Overcast class, then call the getForecast() method.

Overcast::getForecast() returns a nicely structured Forecast object which contains other data structures for handy access to all of the response data from Dark Sky.

```
$overcast = new \VertigoLabs\Overcast\Overcast('YOUR API KEY');
$forecast = $overcast->getForecast(37.8267,-122.423);

// check the number of API calls you've made with your API key for today
echo $overcast->getApiCalls().' API Calls Today'."\n";

// temperature current information
echo 'Current Temp: '.$forecast->getCurrently()->getTemperature()->getCurrent()."\n";
echo 'Feels Like: '.$forecast->getCurrently()->getApparentTemperature()->getCurrent()."\n";
echo 'Min Temp: '.$forecast->getCurrently()->getTemperature()->getMin()."\n";
echo 'Max Temp: '.$forecast->getCurrently()->getTemperature()->getMax()."\n";

// get daily summary
echo 'Daily Summary: '.$forecast->getDaily()->getSummary()."\n";

// loop daily data points
foreach($forecast->getDaily()->getData() as $dailyData) {
	echo 'Date: '.$dailyData->getTime()->format('D, M jS y')."\n";
	// get daily temperature information
	echo 'Min Temp: '.$dailyData->getTemperature()->getMin()."\n";
	echo 'Max Temp: '.$dailyData->getTemperature()->getMax()."\n";

	// get daily precipitation information
	echo 'Precipitation Probability: '.$dailyData->getPrecipitation()->getProbability()."\n";
	echo 'Precipitation Intensity: '.$dailyData->getPrecipitation()->getIntensity()."\n";

	// get other general daily information
	echo 'Wind Speed: '.$dailyData->getWindSpeed()."\n";
	echo 'Wind Direction: '.$dailyData->getWindBearing()."\n";
	echo 'Visibility: '.$dailyData->getVisibility()."\n";
	echo 'Cloud Coverage: '.$dailyData->getCloudCover()."\n";
}
```

This will output:

```
18 API Calls Today

Current Temp: 61.05
Feels Like: 61.05
Min Temp:
Max Temp:

Daily Summary: Drizzle on Tuesday, with temperatures peaking at 65°F on Thursday.

Date: Tue, Mar 31st 15
Min Temp: 53.83
Max Temp: 61.81
Precipitation Probability: 0
Precipitation Intensity: 0
Wind Speed: 12.77
Wind Direction: 308
Visibility: 8.93
Cloud Coverage: 0.25

Date: Wed, Apr 1st 15
Min Temp: 48.72
Max Temp: 60.08
Precipitation Probability: 0
Precipitation Intensity: 0
Wind Speed: 14.47
Wind Direction: 321
Visibility: 10
Cloud Coverage: 0.06

Date: Thu, Apr 2nd 15
Min Temp: 48.96
Max Temp: 65.46
Precipitation Probability: 0
Precipitation Intensity: 0
Wind Speed: 10.02
Wind Direction: 346
Visibility: 10
Cloud Coverage: 0

Date: Fri, Apr 3rd 15
Min Temp: 49.17
Max Temp: 63.68
Precipitation Probability: 0
Precipitation Intensity: 0
Wind Speed: 6.03
Wind Direction: 292
Visibility: 10
Cloud Coverage: 0.07

Date: Sat, Apr 4th 15
Min Temp: 47.14
Max Temp: 58.44
Precipitation Probability: 0
Precipitation Intensity: 0
Wind Speed: 11.48
Wind Direction: 288
Visibility:
Cloud Coverage: 0.3

Date: Sun, Apr 5th 15
Min Temp: 47.95
Max Temp: 56.2
Precipitation Probability: 0.09
Precipitation Intensity: 0.0017
Wind Speed: 14.35
Wind Direction: 285
Visibility:
Cloud Coverage: 0.06

Date: Mon, Apr 6th 15
Min Temp: 44.63
Max Temp: 57.25
Precipitation Probability: 0.01
Precipitation Intensity: 0.0005
Wind Speed: 8.06
Wind Direction: 281
Visibility:
Cloud Coverage: 0

Date: Tue, Apr 7th 15
Min Temp: 51.23
Max Temp: 60.55
Precipitation Probability: 0.32
Precipitation Intensity: 0.0022
Wind Speed: 8.06
Wind Direction: 258
Visibility:
Cloud Coverage: 0.24

```

Todo
----

[](#todo)

- Accept additional API options

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% 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

Every ~131 days

Recently: every ~109 days

Total

6

Last Release

3339d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/53254d08df6c002757411c25e1c1c3fd6af315db3f05c22859050b16aed1ba1c?d=identicon)[jaimz22](/maintainers/jaimz22)

---

Top Contributors

[![jaimz22](https://avatars.githubusercontent.com/u/5921193?v=4)](https://github.com/jaimz22 "jaimz22 (16 commits)")[![danijelk](https://avatars.githubusercontent.com/u/580753?v=4)](https://github.com/danijelk "danijelk (1 commits)")

### Embed Badge

![Health badge](/badges/vertigolabs-overcast/health.svg)

```
[![Health](https://phpackages.com/badges/vertigolabs-overcast/health.svg)](https://phpackages.com/packages/vertigolabs-overcast)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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