Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fpseverino committed Sep 19, 2024
1 parent aefd901 commit 545fe9d
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## Overview

Use this web-based service to streamline your app’s API by moving georelated searches for places, points of interest, geocoding, directions, possible autocompletions for searches, and estimated time of arrival (ETA) calculations from inside your app to your server.

### Getting Started

Use the SPM string to easily include the dependendency in your `Package.swift` file
Expand Down Expand Up @@ -62,6 +64,50 @@ let client = try await AppleMapsClient(
let places = try await client.reverseGeocode(latitude: 37.33182, longitude: -122.03118)
```

### Search for places that match specific criteria

Find places by name or by specific search criteria.

```swift
import AppleMapsKit
import AsyncHTTPClient

let client = try await AppleMapsClient(
httpClient: HTTPClient(...),
teamID: "DEF123GHIJ",
keyID: "ABC123DEFG",
key: """
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
"""
)

let searchResponse = try await client.search(for: "eiffel tower")
```

### Search for places that meet specific criteria to autocomplete a place search

Find results that you can use to autocomplete searches.

```swift
import AppleMapsKit
import AsyncHTTPClient

let client = try await AppleMapsClient(
httpClient: HTTPClient(...),
teamID: "DEF123GHIJ",
keyID: "ABC123DEFG",
key: """
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
"""
)

let results = try await client.searchAutoComplete(for: "eiffel")
```

### Search for directions and estimated travel time between locations

Find directions by specific criteria.
Expand Down
2 changes: 2 additions & 0 deletions Sources/AppleMapsKit/AppleMapsKit.docc/AppleMapsKit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## Overview

Use this web-based service to streamline your app’s API by moving georelated searches for places, points of interest, geocoding, directions, possible autocompletions for searches, and estimated time of arrival (ETA) calculations from inside your app to your server.

### Getting Started

Use the SPM string to easily include the dependendency in your `Package.swift` file
Expand Down
2 changes: 1 addition & 1 deletion Sources/AppleMapsKit/AppleMapsKit.docc/Search.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ let client = try await AppleMapsClient(
)

let searchResponse = try await client.search(for: "eiffel tower")
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ let client = try await AppleMapsClient(
)

let results = try await client.searchAutoComplete(for: "eiffel")
```
```

0 comments on commit 545fe9d

Please sign in to comment.