-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27ba472
commit aaa0167
Showing
5 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// A list of alternate Place IDs and associated errors. | ||
public struct AlternateIDsResponse: Codable, Sendable { | ||
/// A list of ``PlacesResponse/PlaceLookupError`` results. | ||
public let errors: [PlacesResponse.PlaceLookupError]? | ||
|
||
/// A list of ``AlternateIDsResponse/AlternateIDs`` results. | ||
public let results: [AlternateIDs]? | ||
} | ||
|
||
extension AlternateIDsResponse { | ||
/// Contains a list of alternate ``Place`` IDs for a given Place ID. | ||
public struct AlternateIDs: Codable, Sendable { | ||
/// The ``Place`` ID. | ||
public let id: String? | ||
|
||
/// A list of alternate ``Place`` IDs for `id`. | ||
public let alternateIds: [String]? | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// A list of ``Place`` IDs and errors. | ||
public struct PlacesResponse: Codable, Sendable { | ||
/// A list of ``PlacesResponse/PlaceLookupError`` results. | ||
public let errors: [PlaceLookupError]? | ||
|
||
/// A list of ``Place`` results. | ||
public let places: [Place]? | ||
} | ||
|
||
extension PlacesResponse { | ||
/// An error associated with a lookup call. | ||
public struct PlaceLookupError: Codable, Sendable { | ||
/// The ``Place`` ID. | ||
public let id: String? | ||
|
||
/// An error code that indicates whether an ``Place`` ID is invalid because it’s malformed, not found, or resulted in any other error. | ||
public let errorCode: String? | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters