app-reviews/Libraries/Feed/Kit/Sources/Structs/ServiceConfiguration.swift

30 lines
639 B
Swift
Raw Normal View History

//
// ServiceConfiguration.swift
// ReviewsiTunesKit
//
// Created by Javier Cicchelli on 17/03/2024.
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
//
import Foundation
public struct ServiceConfiguration {
// MARK: Constants
public let decoder: JSONDecoder
public let host: URL
public let session: URLSessionConfiguration
// MARK: Initialisers
public init(
host: URL,
session: URLSessionConfiguration = .ephemeral,
decoder: JSONDecoder? = nil
) {
self.decoder = decoder ?? .init()
self.host = host
self.session = session
}
}