diff --git a/Frameworks/Feed/Bundle/Sources/Logic/Structs/FeedListConfiguration.swift b/Frameworks/Feed/Bundle/Sources/Logic/Structs/FeedListConfiguration.swift new file mode 100644 index 0000000..a38d262 --- /dev/null +++ b/Frameworks/Feed/Bundle/Sources/Logic/Structs/FeedListConfiguration.swift @@ -0,0 +1,29 @@ +// +// FeedListConfiguration.swift +// ReviewsFeed +// +// Created by Javier Cicchelli on 21/03/2024. +// Copyright © 2024 Röck+Cöde. All rights reserved. +// + +import Foundation + +public struct FeedListConfiguration { + + // MARK: Constants + let appID: String + let countryCode: String + let session: URLSessionConfiguration + + // MARK: Initialisers + public init( + appID: String = "474495017", + countryCode: String = "nl", + session: URLSessionConfiguration = .ephemeral + ) { + self.appID = appID + self.countryCode = countryCode + self.session = session + } + +} diff --git a/Frameworks/Feed/Bundle/Sources/UI/View Controllers/FeedListViewController.swift b/Frameworks/Feed/Bundle/Sources/UI/View Controllers/FeedListViewController.swift index 78cfe49..6af6d97 100644 --- a/Frameworks/Feed/Bundle/Sources/UI/View Controllers/FeedListViewController.swift +++ b/Frameworks/Feed/Bundle/Sources/UI/View Controllers/FeedListViewController.swift @@ -292,29 +292,6 @@ private extension FeedListViewController { } -// MARK: - Configuration -extension FeedListViewController { - public struct Configuration { - - // MARK: Constants - let appID: String - let countryCode: String - let session: URLSessionConfiguration - - // MARK: Initialisers - public init( - appID: String = "474495017", - countryCode: String = "nl", - session: URLSessionConfiguration = .ephemeral - ) { - self.appID = appID - self.countryCode = countryCode - self.session = session - } - - } -} - // MARK: - String+Constants private extension String { enum Cell { diff --git a/Reviews.xcodeproj/project.pbxproj b/Reviews.xcodeproj/project.pbxproj index 3e3f750..8465ebc 100644 --- a/Reviews.xcodeproj/project.pbxproj +++ b/Reviews.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 0220ADA32BA90646001E6A9F /* FeedItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0220ADA22BA90646001E6A9F /* FeedItemView.swift */; }; 023AC7FC2BAA3EC10027D064 /* Int+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 023AC7FB2BAA3EC10027D064 /* Int+Constants.swift */; }; 02620B8C2BA89C9A00DE7137 /* FeedListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02620B8B2BA89C9A00DE7137 /* FeedListViewModel.swift */; }; + 028134712BACC8CC0074AB4B /* FeedListConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 028134702BACC8CC0074AB4B /* FeedListConfiguration.swift */; }; 02909E792BAB6B0200710E14 /* FilterOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02909E782BAB6B0200710E14 /* FilterOption.swift */; }; 02909E7B2BAB6D2E00710E14 /* Bundle+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02909E7A2BAB6D2E00710E14 /* Bundle+Constants.swift */; }; 02909E7D2BAB7FFE00710E14 /* Review+DTOs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02909E7C2BAB7FFE00710E14 /* Review+DTOs.swift */; }; @@ -62,6 +63,7 @@ 0220ADA22BA90646001E6A9F /* FeedItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedItemView.swift; sourceTree = ""; }; 023AC7FB2BAA3EC10027D064 /* Int+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Constants.swift"; sourceTree = ""; }; 02620B8B2BA89C9A00DE7137 /* FeedListViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListViewModel.swift; sourceTree = ""; }; + 028134702BACC8CC0074AB4B /* FeedListConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListConfiguration.swift; sourceTree = ""; }; 02909E782BAB6B0200710E14 /* FilterOption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterOption.swift; sourceTree = ""; }; 02909E7A2BAB6D2E00710E14 /* Bundle+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle+Constants.swift"; sourceTree = ""; }; 02909E7C2BAB7FFE00710E14 /* Review+DTOs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Review+DTOs.swift"; sourceTree = ""; }; @@ -134,6 +136,7 @@ 02909E772BAB6AD500710E14 /* Enumerations */, 023AC7FA2BAA3EB60027D064 /* Extensions */, 02620B8A2BA89C3300DE7137 /* Models */, + 0281346F2BACC8B00074AB4B /* Structs */, 02620B872BA89C0700DE7137 /* View Models */, ); path = Logic; @@ -174,6 +177,14 @@ path = Models; sourceTree = ""; }; + 0281346F2BACC8B00074AB4B /* Structs */ = { + isa = PBXGroup; + children = ( + 028134702BACC8CC0074AB4B /* FeedListConfiguration.swift */, + ); + path = Structs; + sourceTree = ""; + }; 02909E772BAB6AD500710E14 /* Enumerations */ = { isa = PBXGroup; children = ( @@ -480,6 +491,7 @@ 02C1B1972BAC9BFE001781DE /* FeedListCoordinator.swift in Sources */, 02DC7FAE2BA51B4C000EEEBE /* FeedListViewController.swift in Sources */, 02EACF322BABB23A00FF8ECD /* TopWordsView.swift in Sources */, + 028134712BACC8CC0074AB4B /* FeedListConfiguration.swift in Sources */, 02909E792BAB6B0200710E14 /* FilterOption.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0;