NavigationInteractor

public protocol NavigationInteractor: class

Navigation interactor that maintains a navigation structure consisting of different categories in an application.

  • Most recent local representation of the navigation.

    Declaration

    Swift

    var navigation: NavigationType
  • Type of the data manager in use.

    Declaration

    Swift

    associatedtype DataManagerType: NavigationDataManager
  • Type of the structure used for navigation.

    Declaration

    Swift

    associatedtype NavigationType: CategoryTree
  • Data manager used to establish network communication and retrieve data.

    Declaration

    Swift

    var dataManager: DataManagerType
  • navigation(forCategory:completion:) Default implementation

    Fetches the navigation hierarchy with the given category ID as parent.

  • Parameters:

    • category: Parent category whose subcategories should be fetched.
    • completion: Completion block for the response of updating the local navigation hierarchy.
  • Returns

    The response based on the currently saved navigation hierarchy.

    Default Implementation

    Declaration

    Swift

    func navigation(forCategory category: NavigationType.CategoryType,

    Parameters

    category

    Parent category whose subcategories should be fetched.

    completion

    Completion block for the response of updating the local navigation hierarchy.

    Return Value

    The response based on the currently saved navigation hierarchy.

  • navigation(completion:) Default implementation

    Fetches the entire navigation hierarchy.

    Parameter

    Parameter completion: Completion block for the remote response.

    Returns

    The currently saved navigation hierarchy.

    Default Implementation

    Declaration

    Swift

    func navigation(completion: @escaping (_ navigation: NavigationType?, _ error: Swift.Error?) -> Void)

    Parameters

    completion

    Completion block for the remote response.

    Return Value

    The currently saved navigation hierarchy.