This PR contains the work that implements the Locations service, which is used to retrieve location data from a remote server. To give further details on what was done: - [x] created the `APICore` and `Locations` libraries into the **Libraries** package; - [x] defined the `Endpoint` and `Client` protocols; - [x] implemented the `MakeURLRequestUseCase` use case; - [x] implemented the `MockURLProtocol` protocol and the `MockURLResponse` models; - [x] implemented the `Location` model; - [x] implemented the `GetLocationsEndpoint` endpoint; - [x] implemented the `LocationsClient` client; - [x] implemented the `LocationsService` service. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: rock-n-code/deep-linking-assignment#4
45 lines
850 B
Swift
45 lines
850 B
Swift
// swift-tools-version: 5.8
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "Libraries",
|
|
platforms: [
|
|
.iOS(.v16)
|
|
],
|
|
products: [
|
|
.library(
|
|
name: "Libraries",
|
|
targets: [
|
|
"Locations"
|
|
]
|
|
),
|
|
],
|
|
dependencies: [],
|
|
targets: [
|
|
.target(
|
|
name: "APICore",
|
|
dependencies: []
|
|
),
|
|
.target(
|
|
name: "Locations",
|
|
dependencies: [
|
|
"APICore"
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "APICoreTests",
|
|
dependencies: [
|
|
"APICore"
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "LocationsTests",
|
|
dependencies: [
|
|
"APICore",
|
|
"Locations"
|
|
]
|
|
),
|
|
]
|
|
)
|