Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Commit 96860dd

Browse files
committed
Update readme
1 parent e430525 commit 96860dd

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,33 @@ A simple wrapper for Dark Sky API
1010
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/iranianpep/darksky/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/iranianpep/darksky/?branch=master)
1111
[![Issue Count](https://codeclimate.com/github/iranianpep/darksky/badges/issue_count.svg)](https://codeclimate.com/github/iranianpep/darksky)
1212
[![License](https://poser.pugx.org/darksky/darksky/license)](https://packagist.org/packages/darksky/darksky)
13-
[![StyleCI](https://styleci.io/repos/95418474/shield?branch=master)](https://styleci.io/repos/96892746)
13+
[![StyleCI](https://styleci.io/repos/96892746/shield?branch=master)](https://styleci.io/repos/96892746)
1414
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8575ff8e33034e0a81cedd9464ac359a)](https://www.codacy.com/app/iranianpep/darksky?utm_source=github.com&utm_medium=referral&utm_content=iranianpep/darksky&utm_campaign=Badge_Grade)
1515
[![Packagist](https://img.shields.io/packagist/dt/darksky/darksky.svg)](https://packagist.org/packages/darksky/darksky)
1616
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/iranianpep/darksky/master/LICENSE)
1717

18+
## Server Requirements
19+
- PHP >= 7.0.0
20+
1821
## Usage
19-
- Get the API key
22+
- Get the API key from https://darksky.net/dev
2023
- Install this package in your project:<br> `composer require darksky/darksky`
2124
- To forecast
2225
```
23-
$darksky = new Darksky('API_KEY', 'LAT', 'LONG');
24-
$result = $darksky->forcast();
26+
try {
27+
$darksky = new Darksky('API_KEY', 'LAT', 'LONG');
28+
$result = $darksky->forcast();
29+
} catch(Exception $e) {
30+
// handle the exception
31+
}
2532
```
2633

27-
Or:
28-
34+
- To use the time machine
2935
```
30-
$darksky = new Darksky('API_KEY', 'LAT', 'LONG');
31-
$result = $darksky->timeMachine('UNIX_TIME');
36+
try {
37+
$darksky = new Darksky('API_KEY', 'LAT', 'LONG');
38+
$result = $darksky->timeMachine('UNIX_TIME');
39+
} catch(Exception $e) {
40+
// handle the exception
41+
}
3242
```

src/Darksky/Darksky.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ public function setLongitude($longitude)
132132
}
133133

134134
/**
135-
* @param array $exclude
136-
* @param bool $extend
135+
* @param array $exclude
136+
* @param bool $extend
137+
* @param string $time
137138
*
138139
* @return string
139140
*/

0 commit comments

Comments
 (0)