Skip to content

Commit 3a307d5

Browse files
committed
Updated README.md
1 parent 287b040 commit 3a307d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ Many languages are supported (a full list is available [here](https://darksky.ne
8383
With the `DarkSkyClient`, you can make two kinds of requests. The first will get the current `Forecast` for a particular location:
8484

8585
```swift
86-
client.getForecast(latitude: myLat, longitude: myLon) { result in
86+
let myLoc = CLLocationCoordinate2D(latitude: myLat, longitude: myLon)
87+
client.getForecast(location: myLoc) { result in
8788
switch result {
8889
case .success(let currentForecast, let requestMetadata):
8990
// We got the current forecast!
@@ -96,7 +97,8 @@ client.getForecast(latitude: myLat, longitude: myLon) { result in
9697
The second kind of request is called a time machine request, and it will get a `Forecast` for a particular location at a particular time:
9798

9899
```swift
99-
client.getForecast(latitude: myLat, longitude: myLon, time: myTime) { result in
100+
let myLoc = CLLocationCoordinate2D(latitude: myLat, longitude: myLon)
101+
client.getForecast(location: myLoc, time: myTime) { result in
100102
switch result {
101103
case .success(let forecast, let requestMetadata):
102104
// We got the forecast!

0 commit comments

Comments
 (0)