Skip to content

Commit 180909a

Browse files
chore: deprecate Places components (#232)
1 parent 7c9cfa9 commit 180909a

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

Sources/InstantSearchCore/Hits/Connector/HitsConnector+GeoSearch.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
import Foundation
99

1010
extension Hit: Geolocated {}
11+
12+
@available(*, deprecated, message: "Places feature is deprecated")
1113
public typealias PlaceHit = Hit<Place>
1214

15+
@available(*, deprecated, message: "Places feature is deprecated")
1316
public extension HitsConnector where Hit == PlaceHit {
1417

1518
/**
@@ -18,6 +21,7 @@ public extension HitsConnector where Hit == PlaceHit {
1821
- searcher: Places Searcher that handles your searches
1922
- interactor: External hits interactor
2023
*/
24+
@available(*, deprecated, message: "Places feature is deprecated")
2125
convenience init(searcher: PlacesSearcher,
2226
interactor: HitsInteractor<Hit>) {
2327
self.init(searcher: searcher,
@@ -34,6 +38,7 @@ public extension HitsConnector where Hit == PlaceHit {
3438
- infiniteScrolling: Whether or not infinite scrolling is enabled
3539
- showItemsOnEmptyQuery: If false, no results are displayed when the user hasn’t entered any query text
3640
*/
41+
@available(*, deprecated, message: "Places feature is deprecated")
3742
convenience init(placesAppID: ApplicationID,
3843
apiKey: APIKey,
3944
infiniteScrolling: InfiniteScrolling = Constants.Defaults.infiniteScrolling,
@@ -48,6 +53,7 @@ public extension HitsConnector where Hit == PlaceHit {
4853

4954
}
5055

56+
@available(*, deprecated, message: "Places feature is deprecated")
5157
public extension HitsConnector where Hit == PlaceHit {
5258

5359
/**
@@ -57,6 +63,7 @@ public extension HitsConnector where Hit == PlaceHit {
5763
- interactor: External hits interactor
5864
- controller: Controller interfacing with a concrete hits view
5965
*/
66+
@available(*, deprecated, message: "Places feature is deprecated")
6067
convenience init<Controller: GeoHitsController>(searcher: PlacesSearcher,
6168
interactor: HitsInteractor<Hit>,
6269
controller: Controller) where Controller.DataSource == HitsInteractor<PlaceHit> {
@@ -76,6 +83,7 @@ public extension HitsConnector where Hit == PlaceHit {
7683
- showItemsOnEmptyQuery: If false, no results are displayed when the user hasn’t entered any query text
7784
- controller: Controller interfacing with a concrete hits view
7885
*/
86+
@available(*, deprecated, message: "Places feature is deprecated")
7987
convenience init<Controller: GeoHitsController>(placesAppID: ApplicationID,
8088
apiKey: APIKey,
8189
infiniteScrolling: InfiniteScrolling = Constants.Defaults.infiniteScrolling,
@@ -96,6 +104,7 @@ public extension HitsConnector where Hit == PlaceHit {
96104
- controller: Controller interfacing with a concrete hits view
97105
- Returns: Established connection
98106
*/
107+
@available(*, deprecated, message: "Places feature is deprecated")
99108
@discardableResult func connectController<Controller: GeoHitsController>(_ controller: Controller) -> HitsInteractor<PlaceHit>.GeoHitsControllerConnection<Controller> where Controller.DataSource == HitsInteractor<PlaceHit> {
100109
let connection = interactor.connectController(controller)
101110
controllerConnections.append(connection)

Sources/InstantSearchCore/Hits/HitsInteractor+PlacesSearcher.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import Foundation
1010

11+
@available(*, deprecated, message: "Places feature is deprecated")
1112
public extension HitsInteractor where Record == Hit<Place> {
1213

1314
struct PlacesSearcherConnection: Connection {
@@ -48,6 +49,7 @@ public extension HitsInteractor where Record == Hit<Place> {
4849

4950
public extension HitsInteractor where Record == Hit<Place> {
5051

52+
@available(*, deprecated, message: "Places feature is deprecated")
5153
@discardableResult func connectPlacesSearcher(_ searcher: PlacesSearcher) -> PlacesSearcherConnection {
5254
let connection = PlacesSearcherConnection(interactor: self, searcher: searcher)
5355
connection.connect()

Sources/InstantSearchCore/Pagination/PageLoadable.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extension FacetSearcher: PageLoadable {
3232

3333
}
3434

35+
@available(*, deprecated, message: "Places feature is deprecated")
3536
extension PlacesSearcher: PageLoadable {
3637

3738
public func loadPage(atIndex pageIndex: Int) {

Sources/InstantSearchCore/Searcher/Places/PlacesSearcher.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import Foundation
1010
import AlgoliaSearchClient
1111

12+
@available(*, deprecated, message: "Places feature is deprecated")
1213
final public class PlacesSearcher: AbstractSearcher<AlgoliaPlacesSearchService> {
1314

1415
public var placesQuery: PlacesQuery {

0 commit comments

Comments
 (0)