@@ -89,19 +89,19 @@ import Foundation
8989 @objc public static let SyncDidFinishNotification = Notification . Name ( " AlgoliaSearch.MirroredIndex.SyncDidFinishNotification " )
9090
9191 /// Notification user info key used to pass the error, when an error occurred during the sync.
92- @objc public static let SyncErrorKey = " AlgoliaSearch.MirroredIndex.SyncErrorKey "
92+ @objc public static let syncErrorKey = " AlgoliaSearch.MirroredIndex.syncErrorKey "
9393
9494 /// Default minimum delay between two syncs.
95- @objc public static let DefaultDelayBetweenSyncs : TimeInterval = 60 * 60 * 24 // 1 day
95+ @objc public static let defaultDelayBetweenSyncs : TimeInterval = 60 * 60 * 24 // 1 day
9696
9797 /// Key used to indicate the origin of results in the returned JSON.
98- @objc public static let JSONKeyOrigin = " origin "
98+ @objc public static let jsonKeyOrigin = " origin "
9999
100- /// Value for `JSONKeyOrigin ` indicating that the results come from the local mirror.
101- @objc public static let JSONValueOriginLocal = " local "
100+ /// Value for `jsonKeyOrigin ` indicating that the results come from the local mirror.
101+ @objc public static let jsonValueOriginLocal = " local "
102102
103- /// Value for `JSONKeyOrigin ` indicating that the results come from the online API.
104- @objc public static let JSONValueOriginRemote = " remote "
103+ /// Value for `jsonKeyOrigin ` indicating that the results come from the online API.
104+ @objc public static let jsonValueOriginRemote = " remote "
105105
106106 // ----------------------------------------------------------------------
107107 // MARK: Properties
@@ -148,7 +148,7 @@ import Foundation
148148 }
149149
150150 /// Minimum delay between two syncs.
151- @objc public var delayBetweenSyncs : TimeInterval = DefaultDelayBetweenSyncs
151+ @objc public var delayBetweenSyncs : TimeInterval = defaultDelayBetweenSyncs
152152
153153 /// Date of the last successful sync, or nil if the index has never been successfully synced.
154154 @objc public var lastSuccessfulSyncDate : Date ? {
@@ -432,7 +432,7 @@ import Foundation
432432 DispatchQueue . main. async {
433433 var userInfo : [ String : Any ] ? = nil
434434 if self . syncError != nil {
435- userInfo = [ MirroredIndex . SyncErrorKey : self . syncError!]
435+ userInfo = [ MirroredIndex . syncErrorKey : self . syncError!]
436436 }
437437 NotificationCenter . default. post ( name: MirroredIndex . SyncDidFinishNotification, object: self , userInfo: userInfo)
438438 }
@@ -640,7 +640,7 @@ import Foundation
640640 // Tag results as having a remote origin.
641641 var taggedContent : JSONObject ? = content
642642 if taggedContent != nil {
643- taggedContent ? [ MirroredIndex . JSONKeyOrigin ] = MirroredIndex . JSONValueOriginRemote
643+ taggedContent ? [ MirroredIndex . jsonKeyOrigin ] = MirroredIndex . jsonValueOriginRemote
644644 }
645645 completionHandler ( taggedContent, error)
646646 } )
@@ -715,7 +715,7 @@ import Foundation
715715 // Tag results as having a remote origin.
716716 var taggedContent : JSONObject ? = content
717717 if taggedContent != nil {
718- taggedContent ? [ MirroredIndex . JSONKeyOrigin ] = MirroredIndex . JSONValueOriginRemote
718+ taggedContent ? [ MirroredIndex . jsonKeyOrigin ] = MirroredIndex . jsonValueOriginRemote
719719 }
720720 completionHandler ( taggedContent, error)
721721 } )
@@ -809,7 +809,7 @@ import Foundation
809809 // Tag results as having a local origin.
810810 // NOTE: Each individual result is also automatically tagged, but having a top-level key allows for
811811 // more uniform processing.
812- MirroredIndex . JSONKeyOrigin : MirroredIndex . JSONValueOriginLocal
812+ MirroredIndex . jsonKeyOrigin : MirroredIndex . jsonValueOriginLocal
813813 ]
814814 }
815815 assert ( content != nil || error != nil )
0 commit comments