[Libraries] Locations #4

Merged
javier merged 11 commits from libraries/locations into main 2023-04-10 15:31:23 +00:00
Showing only changes of commit 35c2340a9b - Show all commits

View File

@ -11,12 +11,16 @@ import Foundation
/// This use case generate a url request out of a given endpoint.
public struct MakeURLRequestUseCase {
// MARK: Initialisers
public init() {}
// MARK: Functions
/// Generate a `URLRequest` instance out of a given endpoint that conforms to the `Endpoint` protocol.
/// - Parameter endpoint: An endpoint which is used to generate a `URLRequest` instance from.
/// - Returns: A `URLRequest` instance filled with data provided by the given endpoint.
func callAsFunction(endpoint: some Endpoint) throws -> URLRequest {
public func callAsFunction(endpoint: some Endpoint) throws -> URLRequest {
var urlComponents = URLComponents()
urlComponents.scheme = endpoint.scheme