Skip to content

Commit 8a38ac2

Browse files
authored
Merge pull request #3 from rbridge/darksky.net
Update package to use Darksky.net
2 parents 35cefe6 + 126b3ed commit 8a38ac2

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
[![License](https://poser.pugx.org/vertigolabs/overcast/license.svg)](https://packagist.org/packages/vertigolabs/overcast)
88
[![Total Downloads](https://poser.pugx.org/vertigolabs/overcast/downloads.svg)](https://packagist.org/packages/vertigolabs/overcast)
99

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

12-
Overcast will query the Forecast.io API for weather information for the longitude and latitude you specify. Additionally
13-
you may specify the specific time, past or present.
12+
Overcast will query the Dark Sky API for weather information for the longitude and latitude you specify. Additionally
13+
you may specify the specific time, past or present.
1414

15-
See the [Forecast.io API documentation](https://developer.forecast.io/docs/v2) for more information.
15+
See the [Dark Sky API documentation](https://darksky.net/dev/docs) for more information.
1616

1717
## Installation
1818
Installation is as simple as using [Composer](http://getcomposer.org/):
@@ -26,7 +26,7 @@ Installation is as simple as using [Composer](http://getcomposer.org/):
2626
```
2727

2828
## Client Adapters
29-
Overcast uses client adapters to connect to the Forecast.io 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)
29+
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)
3030

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

@@ -41,10 +41,10 @@ $overcast = new \VertigoLabs\Overcast\Overcast('YOUR API KEY', new MyAwesomeClie
4141
```
4242

4343
## Example
44-
Since the Forecast.io API is simple, Overcast is equally easy to use.
44+
Since the Dark Sky API is simple, Overcast is equally easy to use.
4545
Simply create an instance of the Overcast class, then call the getForecast() method.
4646

47-
Overcast::getForecast() returns a nicely structured Forecast object which contains other data structures for handy access to all of the response data from Forecast.io.
47+
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.
4848

4949
```php
5050
$overcast = new \VertigoLabs\Overcast\Overcast('YOUR API KEY');

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vertigolabs/overcast",
3-
"description": "An easy to use wrapper for the Forecast.io API",
3+
"description": "An easy to use wrapper for the Dark Sky API (formerly Forecast.io)",
44
"license": "MIT",
55
"authors": [
66
{
@@ -9,7 +9,7 @@
99
}
1010
],
1111
"suggest": {
12-
"guzzlehttp/guzzle": "Allows for better handling of http connections to Forecast.io webservice"
12+
"guzzlehttp/guzzle": "Allows for better handling of http connections to Dark Sky webservice"
1313
},
1414
"autoload": {
1515
"psr-4": {

src/ClientAdapters/GuzzleClientAdapter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Class GuzzleClientAdapter
1616
*
1717
* The Guzzle client adapter uses Guzzle to connect to
18-
* the Forecast.io api
18+
* the Dark Sky API
1919
*
2020
* @package VertigoLabs\Overcast\ClientAdapters
2121
*/
@@ -40,8 +40,8 @@ public function __construct(Client $guzzleClient = null)
4040
}
4141

4242
/**
43-
* Returns the response data from the Forecast.io in the
44-
* form of an array
43+
* Returns the response data from the Dark Sky in the
44+
* form of an array.
4545
*
4646
* @param float $latitude
4747
* @param float $longitude
@@ -76,7 +76,7 @@ public function getForecast($latitude, $longitude, \DateTime $time = null, array
7676
}
7777

7878
/**
79-
* Returns the relevant response headers from the Forecast.io API
79+
* Returns the relevant response headers from the Dark Sky API.
8080
*
8181
* @return array
8282
*/

src/Forecast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Class Forecast
1616
*
1717
* The Forecast class represents the data returned
18-
* from the Forecast.io API
18+
* from the Dark Sky API
1919
*
2020
* @package VertigoLabs\Overcast
2121
*/

src/Overcast.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
/**
2020
* Class Overcast
2121
*
22-
* The Overcast class provides access to the Forecast.io API
22+
* The Overcast class provides access to the Dark Sky API
2323
*
2424
* @package VertigoLabs\Overcast
2525
*/
2626
class Overcast
2727
{
28-
const API_ENDPOINT = 'https://api.forecast.io/forecast/';
28+
const API_ENDPOINT = 'https://api.darksky.net/forecast/';
2929

3030
/**
3131
* Private API Key
@@ -38,7 +38,7 @@ class Overcast
3838
*/
3939
private $apiCalls = 0;
4040
/**
41-
* The adapter used to connect to the Forecast.io webservice
41+
* The adapter used to connect to the Dark Sky webservice.
4242
* @var ClientAdapterInterface
4343
*/
4444
private $adapter;
@@ -47,7 +47,7 @@ class Overcast
4747
* Construct the Overcast class.
4848
*
4949
* You may optionally specify an adapter class which is used
50-
* to connect to the Forecast.io API. If no adapter is specified
50+
* to connect to the Dark Sky API. If no adapter is specified
5151
* a default will be chosen. If the Guzzle client is available the
5252
* GuzzleAdapter will be chosen, otherwise the FileGetContentsAdapter
5353
* will be used.

0 commit comments

Comments
 (0)