MNNetworkManager
public class MNNetworkManager : NSObject
Faciliates synchronous and asynchronous network operations.
-
Manages the various URLs associated with different types of requests.
Declaration
Swift
public let url: MNUrlManager -
Setup method
Declaration
Swift
public func setup() -
Declaration
Swift
public func getPropertyAndCategorySync() -> Bool -
Declaration
Swift
public func cmsFetchPropertyCategories(propertyIds: [Int], dispatchGroup: DispatchGroup) -
Declaration
Swift
public func fetchLastestSyncId(propertyId: Int) -> Bool -
Fetches the latest Sync ID for a property from CMS
Declaration
Swift
public func cmsFetchPropertyLatestSyncId(propertyId: Int, completion: @escaping ((String?) -> Void))Parameters
propertyIdcompletionClosure to execute after fetching data
-
Fetches global search categories from CMS
Declaration
Swift
public func cmsGlobalSearchCategories(propertyIds: [Int], categoryName: String, completion: (([CMSSearchResultInfo]?) -> Void)? = nil)Parameters
propertyIdscategoryNameThe name of the category to match for search
completionClosure to execute after fetching data
-
Fetches the latest Sync ID for a property
Declaration
Swift
public func cmsGlobalSearch(propertyIds: [Int], lookup: String, completion: (([CMSSearchResultInfo]?) -> Void)? = nil)Parameters
propertyIdslookupThe text to search for
completionClosure to execute after fetching data
-
Fetches the latest information for a list of properties
Declaration
Swift
public func cmsFetchPropertyInfoBatch(propertyIds: [Int], completion: (([CMSPropertyInfo]?) -> Void)? = nil)Parameters
propertyIdscompletionClosure to execute after fetching data
-
Fetches the latest information for the given property
Declaration
Swift
public func cmsFetchPropertyInfo(propertyId: Int, completion: ((Bool) -> Void)? = nil)Parameters
propertyIdproperty Id of the property
completionClosure to execute after fetching data
-
Fetches the latest information for a list of properties
Declaration
Swift
public func cmsFetchHolidays(year: Int, countryCode: String, completion: (([String: [String:String]]?) -> Void)? = nil)Parameters
propertyIdscompletionClosure to execute after fetching data
-
Declaration
Swift
public func cmsFetchBuildingData(propertyId: Int, buildingId: Int, syncCheck: Bool = false) -> Bool -
Declaration
Swift
public func cmsFetchPropertyCategoryTree(propertyId: Int, completion: ((CMSCategoryTree?) -> Void)? = nil) -
Synchronously retrieve all property infos
Declaration
Swift
public func getPropertyInfosSync() -> Bool -
Declaration
Swift
public func cmsGetDestinationInstruction(propertyId: Int, completion: @escaping ((Bool) -> Void)) -
Declaration
Swift
public func cmsOnlineSearch(propertyId: Int, text: String, lang: String, page: Int, limit: Int, completion: ((CMSOnlineSearchResultInfo?) -> Void)? = nil)
-
Asynchronously retrieve property info based on the provided parameters
Declaration
Swift
public func getPropertyInfosAsync(completion: ((Bool) -> Void)? = nil)Parameters
completionAn optionnal closure to be called when the method completes
-
Asynchronously retrieve property meta data based on the provided parameters
Declaration
Swift
public func getPropertyMetaDataAsync(propertyId: Int, completion: ((Bool) -> Void)? = nil)Parameters
completionAn optionnal closure to be called when the method completes
-
Asynchronously get property categories data based on the provided parameters
Declaration
Swift
public func getBuildingData(buildingId: Int, completion: ((Bool) -> Void)? = nil)Parameters
completionAn optionnal closure to be called when the method completes
-
Declaration
Swift
public func getPropertyCategoryTree(propertyId: Int, completion: ((CMSCategoryTree?) -> Void)? = nil) -
Asynchronously get property categories data based on the provided parameters
Declaration
Swift
public func getBuildingDataForProperty(propertyId: Int, buildingId: Int, syncCheck: Bool, completion: ((Bool) -> Void)? = nil)Parameters
completionAn optionnal closure to be called when the method completes
-
Declaration
Swift
public func fetchDataForDataCapture(DataCaptureId: Int, completion: @escaping ((Data?) -> Void)) -
Declaration
Swift
public func cmsFetchAlertsForProperty(id propertyId: Int, completion: ((CMSAlertInfo?) -> ())? = nil) -
Declaration
Swift
public func cmsFetchEmergencyAlertsForProperties(id propertyIds: [Int], completion: ((CMSEmergencyAlertInfo?) -> ())? = nil) -
Declaration
Swift
public func cmsFetchEmergencyAlertsById(alertId: String, completion: ((CMSEmergencyAlertInfo?) -> ())? = nil) -
Declaration
Swift
public func cmsFetchLatestSyncIdForPropertyAlerts(id propertyId: Int, completion: ((String?) -> ())? = nil)
MNNetworkManager Class Reference