diff --git a/CHANGELOG.md b/CHANGELOG.md index a4501e2de..bef606aa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,14 @@ Guide: https://keepachangelog.com/en/1.0.0/ +- [Demo] Update Demo app to use MapboxMaps +- [Demo] Rename 'Discover' tab to 'Category' in Demo app target +- [Demo] Add earlier examples into MapboxSearch.xcodeproj Demo target - [SearchUI] Add `Maki: RawRepresentable` conformance for `Maki(rawValue:)` initializer -- [Demo] Update DiscoverViewController to use MapboxMaps +- [Core] Add public scope to several types and initializers for broader support + +**MapboxCommon**: v24.5.0 +**MapboxCoreSearch**: v2.3.0-rc.1 ## 2.2.0 diff --git a/Cartfile b/Cartfile index 9de80ec3b..8bcead665 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -binary "https://api.mapbox.com/downloads/v2/carthage/search-core-sdk/MapboxCoreSearch.xcframework.json" == 2.2.0 -binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" == 24.5.0 \ No newline at end of file +binary "https://api.mapbox.com/downloads/v2/carthage/search-core-sdk/MapboxCoreSearch.xcframework.json" == 2.3.0-rc.3 +binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" == 24.6.0-beta.1 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index b0ced99e6..bc1214827 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" "24.5.0" -binary "https://api.mapbox.com/downloads/v2/carthage/search-core-sdk/MapboxCoreSearch.xcframework.json" "2.2.0" +binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" "24.6.0-beta.1" +binary "https://api.mapbox.com/downloads/v2/carthage/search-core-sdk/MapboxCoreSearch.xcframework.json" "2.3.0-rc.3" diff --git a/MapboxSearch.xcodeproj/project.pbxproj b/MapboxSearch.xcodeproj/project.pbxproj index 6904f9b19..cfd6d1e58 100644 --- a/MapboxSearch.xcodeproj/project.pbxproj +++ b/MapboxSearch.xcodeproj/project.pbxproj @@ -50,6 +50,7 @@ 04C0848D2B4C82F3002F9C69 /* SdkInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C0848C2B4C82F3002F9C69 /* SdkInformation.swift */; }; 04C127552B62F6BC00884325 /* ApiType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C127542B62F6BC00884325 /* ApiType.swift */; }; 04C127582B62FFDB00884325 /* ApiType+Core.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C127572B62FFDB00884325 /* ApiType+Core.swift */; }; + 04CECA012C3EE28B007117E4 /* ResultDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CECA002C3EE28B007117E4 /* ResultDetailViewController.swift */; }; 04CECA092C3EFAAF007117E4 /* MapboxMapsCategoryResultsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CECA032C3EFAAF007117E4 /* MapboxMapsCategoryResultsViewController.swift */; }; 04CECA0A2C3EFAAF007117E4 /* SimpleCategorySearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CECA042C3EFAAF007117E4 /* SimpleCategorySearchViewController.swift */; }; 04CECA0B2C3EFAAF007117E4 /* ContinuousSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CECA052C3EFAAF007117E4 /* ContinuousSearchViewController.swift */; }; @@ -60,7 +61,6 @@ 04CECA142C3EFAB9007117E4 /* MapsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CECA102C3EFAB9007117E4 /* MapsViewController.swift */; }; 04CECA152C3EFAB9007117E4 /* TextViewLoggerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CECA112C3EFAB9007117E4 /* TextViewLoggerViewController.swift */; }; 04CECA162C3EFAB9007117E4 /* ExamplesTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CECA122C3EFAB9007117E4 /* ExamplesTableViewController.swift */; }; - 04CECA012C3EE28B007117E4 /* ResultDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CECA002C3EE28B007117E4 /* ResultDetailViewController.swift */; }; 04DAF7582BDAAB4C002719E2 /* OfflineDemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04DAF7572BDAAB4C002719E2 /* OfflineDemoViewController.swift */; }; 04DFB40C2B8CF1ED00231830 /* search-box-suggestions-categories.json in Resources */ = {isa = PBXBuildFile; fileRef = 04DFB40B2B8CF1ED00231830 /* search-box-suggestions-categories.json */; }; 04DFB40D2B8CF1ED00231830 /* search-box-suggestions-categories.json in Resources */ = {isa = PBXBuildFile; fileRef = 04DFB40B2B8CF1ED00231830 /* search-box-suggestions-categories.json */; }; @@ -561,6 +561,7 @@ 04C0848C2B4C82F3002F9C69 /* SdkInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SdkInformation.swift; sourceTree = ""; }; 04C127542B62F6BC00884325 /* ApiType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiType.swift; sourceTree = ""; }; 04C127572B62FFDB00884325 /* ApiType+Core.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ApiType+Core.swift"; sourceTree = ""; }; + 04CECA002C3EE28B007117E4 /* ResultDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultDetailViewController.swift; sourceTree = ""; }; 04CECA032C3EFAAF007117E4 /* MapboxMapsCategoryResultsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MapboxMapsCategoryResultsViewController.swift; path = Sources/Demo/Examples/MapboxMapsCategoryResultsViewController.swift; sourceTree = SOURCE_ROOT; }; 04CECA042C3EFAAF007117E4 /* SimpleCategorySearchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SimpleCategorySearchViewController.swift; path = Sources/Demo/Examples/SimpleCategorySearchViewController.swift; sourceTree = SOURCE_ROOT; }; 04CECA052C3EFAAF007117E4 /* ContinuousSearchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContinuousSearchViewController.swift; path = Sources/Demo/Examples/ContinuousSearchViewController.swift; sourceTree = SOURCE_ROOT; }; @@ -571,7 +572,6 @@ 04CECA102C3EFAB9007117E4 /* MapsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MapsViewController.swift; path = Sources/Demo/Examples/MapsViewController.swift; sourceTree = SOURCE_ROOT; }; 04CECA112C3EFAB9007117E4 /* TextViewLoggerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TextViewLoggerViewController.swift; path = Sources/Demo/Examples/TextViewLoggerViewController.swift; sourceTree = SOURCE_ROOT; }; 04CECA122C3EFAB9007117E4 /* ExamplesTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ExamplesTableViewController.swift; path = Sources/Demo/Examples/ExamplesTableViewController.swift; sourceTree = SOURCE_ROOT; }; - 04CECA002C3EE28B007117E4 /* ResultDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultDetailViewController.swift; sourceTree = ""; }; 04DAF7572BDAAB4C002719E2 /* OfflineDemoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OfflineDemoViewController.swift; sourceTree = ""; }; 04DFB40B2B8CF1ED00231830 /* search-box-suggestions-categories.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "search-box-suggestions-categories.json"; sourceTree = ""; }; 04DFB40F2B8CF46D00231830 /* search-box-retrieve-categories.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "search-box-retrieve-categories.json"; sourceTree = ""; }; @@ -3604,7 +3604,7 @@ repositoryURL = "https://github.com/mapbox/mapbox-common-ios.git"; requirement = { kind = exactVersion; - version = 24.5.0; + version = "24.6.0-beta.1"; }; }; 042BEB182C2DE30E0004CD7B /* XCRemoteSwiftPackageReference "mapbox-maps-ios" */ = { @@ -3612,7 +3612,7 @@ repositoryURL = "https://github.com/mapbox/mapbox-maps-ios.git"; requirement = { kind = exactVersion; - version = 11.5.0; + version = "11.6.0-beta.1"; }; }; 149948E5290A8ACE00E7E619 /* XCRemoteSwiftPackageReference "swifter" */ = { diff --git a/MapboxSearch.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/MapboxSearch.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 15d826c01..ee5874981 100644 --- a/MapboxSearch.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/MapboxSearch.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -24,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "add54e4b7d4cfe1e12600d73af6d38a536b37085", - "version" : "24.5.0" + "revision" : "03c1b2ee8d57d1fa95af7c472c9707cb897b2376", + "version" : "24.6.0-beta.1" } }, { @@ -33,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "5d5d126c7a0f743b05c8889437e788fdd2356308", - "version" : "11.5.0" + "revision" : "86992e7b2604282fc10680e524a2a67a4586df05", + "version" : "11.6.0-beta.1" } }, { @@ -42,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-maps-ios.git", "state" : { - "revision" : "692d783e92077d34af0a766b57cd4c85e341db61", - "version" : "11.5.0" + "revision" : "86476e9828bb3a61527a00f767d45a19f93219f5", + "version" : "11.6.0-beta.1" } }, { diff --git a/Package.swift b/Package.swift index 3264919e1..d18407635 100644 --- a/Package.swift +++ b/Package.swift @@ -4,9 +4,9 @@ import PackageDescription import Foundation -let (coreSearchVersion, coreSearchVersionHash) = ("2.2.0", "350fb52d0bc1caf60e14270aa603aab1f4f2ae7a907eddf24e1b700fbd709f6d") +let (coreSearchVersion, coreSearchVersionHash) = ("2.3.0-rc.3", "409ad69ede360cd97fe54470aa3bf4aeae07ec452beda838fbc9cca0227f6fd5") -let mapboxCommonSDKVersion = Version("24.5.0") +let mapboxCommonSDKVersion = Version("24.6.0-beta.1") let package = Package( name: "MapboxSearch", diff --git a/Sources/MapboxSearch/InternalAPI/CoreAliases.swift b/Sources/MapboxSearch/InternalAPI/CoreAliases.swift index c718e5480..1a5376dea 100644 --- a/Sources/MapboxSearch/InternalAPI/CoreAliases.swift +++ b/Sources/MapboxSearch/InternalAPI/CoreAliases.swift @@ -22,6 +22,8 @@ typealias CoreQueryType = MapboxCoreSearch.QueryType typealias CoreImageInfo = MapboxCoreSearch.ImageInfo typealias CoreOpenHours = MapboxCoreSearch.OpenHours typealias CoreOpenPeriod = MapboxCoreSearch.OpenPeriod +typealias CoreParkingData = MapboxCoreSearch.ParkingData +typealias CoreResultChildMetadata = MapboxCoreSearch.ResultChildMetadata typealias CoreAccuracy = MapboxCoreSearch.ResultAccuracy typealias CoreSearchAddressRegion = MapboxCoreSearch.SearchAddressRegion typealias CoreSearchAddressCountry = MapboxCoreSearch.SearchAddressCountry diff --git a/Sources/MapboxSearch/InternalAPI/CoreResultMetadataProtocol.swift b/Sources/MapboxSearch/InternalAPI/CoreResultMetadataProtocol.swift index 5526e2359..4897859f8 100644 --- a/Sources/MapboxSearch/InternalAPI/CoreResultMetadataProtocol.swift +++ b/Sources/MapboxSearch/InternalAPI/CoreResultMetadataProtocol.swift @@ -1,20 +1,113 @@ import Foundation protocol CoreResultMetadataProtocol { + // MARK: Basic metadata + + /** Dictionary with other metadata like "iso\_3166\_1" and "iso\_3166\_2" codes. */ var data: [String: String] { get } + /** Child metadata for a POI */ + var children: [CoreResultChildMetadata]? { get } + + /** Primary photos array. */ var primaryImage: [CoreImageInfoProtocol]? { get } + + /** Secondary photos array. */ var otherImage: [CoreImageInfoProtocol]? { get } + /** Long form detailed description for POI. */ var description: String? { get } + /** The average rating of the location, on a scale from 1 to 5. */ var averageRating: NSNumber? { get } + + /** The number of reviews for this result. */ var reviewCount: NSNumber? { get } + /** Phone number. */ var phone: String? { get } + + /** The website URL associated with the location. */ var website: String? { get } + // MARK: Characteristics and Options + + /** The price level of the location, represented by a string including dollar signs. The values scale from Cheap "$" to Most Expensive "$$$$". */ + var priceLevel: String? { get } + + /** A popularity score for the location, calculated based on user engagement and review counts. The value scales from 0 to 1, 1 being the most popular. */ + var popularity: NSNumber? { get } + + /** POI open hours */ var openHours: CoreOpenHours? { get } + + /** Parking information for POIs. */ + var parkingData: CoreParkingData? { get } + + /** Indicates whether the location is accessible by wheelchair. */ + var wheelchairAccessible: Bool? { get } + + /** Indicates whether the location offers delivery services. */ + var delivery: Bool? { get } + + /** Indicates whether the location has a drive-through service. */ + var driveThrough: Bool? { get } + + /** Indicates whether the location accepts reservations. */ + var reservable: Bool? { get } + + /** Indicates whether parking is available at the location. */ + var parkingAvailable: Bool? { get } + + /** Indicates whether valet parking services are offered. */ + var valetParking: Bool? { get } + + /** Indicates the availability of street parking near the location. */ + var streetParking: Bool? { get } + + /** Indicates whether breakfast is served. */ + var servesBreakfast: Bool? { get } + + /** Indicates whether brunch is served. */ + var servesBrunch: Bool? { get } + + /** Indicates whether dinner is served. */ + var servesDinner: Bool? { get } + + /** Indicates whether lunch is served. */ + var servesLunch: Bool? { get } + + /** Indicates whether wine is served. */ + var servesWine: Bool? { get } + + /** Indicates whether beer is served. */ + var servesBeer: Bool? { get } + + /** Indicates whether vegan diet options are available. */ + var servesVegan: Bool? { get } + + /** Indicates whether vegetarian diet options are available. */ + var servesVegetarian: Bool? { get } + + /** Indicates whether takeout services are available. */ + var takeout: Bool? { get } + + // MARK: Social Media and Contact + + /** The Facebook ID associated with the feature. */ + var facebookId: String? { get } + + /** The fax number associated with the location. */ + var fax: String? { get } + + /** The email address associated with the location. */ + var email: String? { get } + + /** The Instagram handle associated with the location. */ + var instagram: String? { get } + + /** The Twitter handle associated with the location. */ + var twitter: String? { get } } extension CoreResultMetadata: CoreResultMetadataProtocol { @@ -29,4 +122,74 @@ extension CoreResultMetadata: CoreResultMetadataProtocol { var averageRating: NSNumber? { avRating } + + var parkingData: CoreParkingData? { + parking + } + + // MARK: Characteristics and Options Implementation + + var wheelchairAccessible: Bool? { + __wheelchairAccessible?.boolValue + } + + var delivery: Bool? { + __delivery?.boolValue + } + + var driveThrough: Bool? { + __driveThrough?.boolValue + } + + var reservable: Bool? { + __reservable?.boolValue + } + + var parkingAvailable: Bool? { + __parkingAvailable?.boolValue + } + + var valetParking: Bool? { + __valetParking?.boolValue + } + + var streetParking: Bool? { + __streetParking?.boolValue + } + + var servesBreakfast: Bool? { + __servesBreakfast?.boolValue + } + + var servesBrunch: Bool? { + __servesBrunch?.boolValue + } + + var servesDinner: Bool? { + __servesDinner?.boolValue + } + + var servesLunch: Bool? { + __servesLunch?.boolValue + } + + var servesWine: Bool? { + __servesWine?.boolValue + } + + var servesBeer: Bool? { + __servesBeer?.boolValue + } + + var servesVegan: Bool? { + __servesVegan?.boolValue + } + + var servesVegetarian: Bool? { + __servesVegetarian?.boolValue + } + + var takeout: Bool? { + __takeout?.boolValue + } } diff --git a/Sources/MapboxSearch/PublicAPI/SearchOptions.swift b/Sources/MapboxSearch/PublicAPI/SearchOptions.swift index 44b6a6663..d0afc367a 100644 --- a/Sources/MapboxSearch/PublicAPI/SearchOptions.swift +++ b/Sources/MapboxSearch/PublicAPI/SearchOptions.swift @@ -257,7 +257,10 @@ public struct SearchOptions { route: routeOptions?.route.coordinates.map(Coordinate2D.init(value:)), sarType: routeOptions?.deviation.sarType?.toCore(), timeDeviation: timeDeviation, - addonAPI: unsafeParameters + addonAPI: unsafeParameters, + attributeSets: nil, + worldview: nil, + baseUrl: nil ) } diff --git a/Tests/MapboxSearchTests/Common/Data Samples/CoreSearchOptions+Samples.swift b/Tests/MapboxSearchTests/Common/Data Samples/CoreSearchOptions+Samples.swift index 24e5d11bd..80b48552e 100644 --- a/Tests/MapboxSearchTests/Common/Data Samples/CoreSearchOptions+Samples.swift +++ b/Tests/MapboxSearchTests/Common/Data Samples/CoreSearchOptions+Samples.swift @@ -31,7 +31,10 @@ extension CoreSearchOptions { ], sarType: "isochrone", timeDeviation: 10, - addonAPI: nil + addonAPI: nil, + attributeSets: nil, + worldview: nil, + baseUrl: nil ) static let sample2 = CoreSearchOptions( @@ -66,6 +69,9 @@ extension CoreSearchOptions { ], sarType: "isochrone", timeDeviation: 10, - addonAPI: nil + addonAPI: nil, + attributeSets: nil, + worldview: nil, + baseUrl: nil ) } diff --git a/Tests/MapboxSearchTests/Common/Data Samples/SearchResultMetadata+Samples.swift b/Tests/MapboxSearchTests/Common/Data Samples/SearchResultMetadata+Samples.swift index adb66f631..52fd71c95 100644 --- a/Tests/MapboxSearchTests/Common/Data Samples/SearchResultMetadata+Samples.swift +++ b/Tests/MapboxSearchTests/Common/Data Samples/SearchResultMetadata+Samples.swift @@ -26,7 +26,7 @@ extension SearchResultMetadata { extension CoreResultMetadata { static func make(data: [String: String] = [:]) -> CoreResultMetadata { - .init( + CoreResultMetadata( reviewCount: nil, phone: nil, website: nil, @@ -37,7 +37,32 @@ extension CoreResultMetadata { otherPhoto: nil, cpsJson: nil, parking: nil, - data: data + children: nil, + data: data, + wheelchairAccessible: nil, + delivery: nil, + driveThrough: nil, + reservable: nil, + parkingAvailable: nil, + valetParking: nil, + streetParking: nil, + servesBreakfast: nil, + servesBrunch: nil, + servesDinner: nil, + servesLunch: nil, + servesWine: nil, + servesBeer: nil, + takeout: nil, + facebookId: nil, + fax: nil, + email: nil, + instagram: nil, + twitter: nil, + priceLevel: nil, + servesVegan: nil, + servesVegetarian: nil, + rating: nil, + popularity: nil ) } } diff --git a/Tests/MapboxSearchTests/Common/Models/Metadata/OpenHoursTests.swift b/Tests/MapboxSearchTests/Common/Models/Metadata/OpenHoursTests.swift index e4db4e39d..ad3f6f6e2 100644 --- a/Tests/MapboxSearchTests/Common/Models/Metadata/OpenHoursTests.swift +++ b/Tests/MapboxSearchTests/Common/Models/Metadata/OpenHoursTests.swift @@ -3,28 +3,28 @@ import XCTest class OpenHoursTests: XCTestCase { func testAlwaysOpenedCoreConversion() throws { - let coreHours = CoreOpenHours(mode: .alwaysOpen, periods: []) + let coreHours = CoreOpenHours(mode: .alwaysOpen, periods: [], weekdayText: nil, note: nil) let hours = OpenHours(coreHours) XCTAssertEqual(hours, .alwaysOpened) } func testTemporarilyClosedCoreConversion() throws { - let coreHours = CoreOpenHours(mode: .temporarilyClosed, periods: []) + let coreHours = CoreOpenHours(mode: .temporarilyClosed, periods: [], weekdayText: nil, note: nil) let hours = OpenHours(coreHours) XCTAssertEqual(hours, .temporarilyClosed) } func testPermanentlyClosedCoreConversion() throws { - let coreHours = CoreOpenHours(mode: .permanentlyClosed, periods: []) + let coreHours = CoreOpenHours(mode: .permanentlyClosed, periods: [], weekdayText: nil, note: nil) let hours = OpenHours(coreHours) XCTAssertEqual(hours, .permanentlyClosed) } func testScheduledCoreConversion() throws { - let coreHours = CoreOpenHours(mode: .scheduled, periods: .coreOpenHourPeriods()) + let coreHours = CoreOpenHours(mode: .scheduled, periods: .coreOpenHourPeriods(), weekdayText: nil, note: nil) let hours = OpenHours(coreHours) if case .scheduled(let periods) = hours { diff --git a/Tests/MapboxSearchTests/Common/Stubs&Models/CoreSearchResultMetadataStub.swift b/Tests/MapboxSearchTests/Common/Stubs&Models/CoreSearchResultMetadataStub.swift index 84b1e6c68..5f54596b0 100644 --- a/Tests/MapboxSearchTests/Common/Stubs&Models/CoreSearchResultMetadataStub.swift +++ b/Tests/MapboxSearchTests/Common/Stubs&Models/CoreSearchResultMetadataStub.swift @@ -1,6 +1,41 @@ import Foundation @testable import MapboxSearch +/// Test-only convenience +extension CoreResultMetadataProtocol { + var priceLevel: String? { nil } + var popularity: NSNumber? { nil } + + // MARK: Characteristics and Options + + var openHours: CoreOpenHours? { nil } + var parkingData: CoreParkingData? { nil } + var wheelchairAccessible: Bool? { nil } + var delivery: Bool? { nil } + var driveThrough: Bool? { nil } + var reservable: Bool? { nil } + var parkingAvailable: Bool? { nil } + var valetParking: Bool? { nil } + var streetParking: Bool? { nil } + var servesBreakfast: Bool? { nil } + var servesBrunch: Bool? { nil } + var servesDinner: Bool? { nil } + var servesLunch: Bool? { nil } + var servesWine: Bool? { nil } + var servesBeer: Bool? { nil } + var servesVegan: Bool? { nil } + var servesVegetarian: Bool? { nil } + var takeout: Bool? { nil } + + // MARK: Social Media and Contact + + var facebookId: String? { nil } + var fax: String? { nil } + var email: String? { nil } + var instagram: String? { nil } + var twitter: String? { nil } +} + class CoreSearchResultMetadataStub: CoreResultMetadataProtocol { init( data: [String: String], @@ -11,7 +46,8 @@ class CoreSearchResultMetadataStub: CoreResultMetadataProtocol { reviewCount: NSNumber? = nil, phone: String? = nil, website: String? = nil, - openHours: CoreOpenHours? = nil + openHours: CoreOpenHours? = nil, + children: [CoreResultChildMetadata]? = nil ) { self.data = data self.primaryImage = primaryImage @@ -32,8 +68,8 @@ class CoreSearchResultMetadataStub: CoreResultMetadataProtocol { var reviewCount: NSNumber? var phone: String? var website: String? - var openHours: CoreOpenHours? + var children: [CoreResultChildMetadata]? static let sample1 = CoreSearchResultMetadataStub( data: [