     /**
      - important: All params except **type** and **url** are optional
      - parameters:
-     - type: Object type
-     - url: String with url
-     - method: Use this parameter in your method call if you want to override *defaultMethod* property
-     - parameters: Call parameters in `[String:Any]` format
-     - paramsEncoding: Use this parameter in your method call if you want to override *defaultParamEncoding* property
-     - headers: Use this parameter in your method call if you want to override *defaultHeaders* property
-     - saveResponseToRealm: Use this parameter in your method call if you want to override *automaticalySaveToRealm* property
-     - success: Success completion block with received object
-     - objects: Objects that are included in success completion block
-     - fail: Failure completion block with *SimpleApiError* param. If this param is **.fail**, additional *Error* param is included
-     - apiError: Always included in fail block
-     - error: Appears in fail block if *apiErrors* value is **.fail**
+         - type: Object type
+         - url: String with url
+         - method: Use this parameter in your method call if you want to override *defaultMethod* property
+         - parameters: Call parameters in `[String:Any]` format
+         - paramsEncoding: Use this parameter in your method call if you want to override *defaultParamEncoding* property
+         - headers: Use this parameter in your method call if you want to override *defaultHeaders* property
+         - saveResponseToRealm: Use this parameter in your method call if you want to override *automaticalySaveToRealm* property
+         - success: Success completion block with received object
+         - objects: Objects that are included in success completion block
+         - fail: Failure completion block with *SimpleApiError* param. If this param is **.fail**, additional *Error* param is included
+         - apiError: Always included in fail block
+         - error: Appears in fail block if *apiErrors* value is **.fail**
      */
     public func getArray<T:Object>(type:T.Type,
                           url:String,

    }
}

fileprivate class DataManager: NSObject {
    
    static let shared = DataManager()

import ObjectMapper
import ReachabilitySwift

public let kNoInternetNotification = Notification.Name(rawValue: "kNoInternetNotification")
public let kInternetIsBackNotification = Notification.Name(rawValue: "kInternetIsBackNotification")

/** Api manager class
 - important: Use as singleton only with attribute **.shared**
 */
public class SimpleApi: NSObject {
    
    //MARK: - public attributes
    public var autoSaveToRealm: Bool = true {
        didSet{ saveToRealm() }
    }
    public var callLastApiCallAfterInternetComesBack = true {
        didSet{ saveToRealm() }
    }
    public var defaultMethod: CallMethod = .get {
        didSet{ saveToRealm() }
    }
    public var defaultParamEncoding: ParamsEncoding = .standard {
        didSet{ saveToRealm() }
    }
    public var defaultHeaders: [String: String]? = nil {
        didSet{ saveToRealm() }
    }
    public static let shared = SimpleApi()
    
    //MARK: - private attributes
    private let reachability = Reachability()!
    private var firstChange:Bool = true
    private var lastCalled:()->Void = {}
    private var delegates:[SimpleApiDelegate] = []
    private var isLoading:Bool = false
    
    typealias successParam = ()->Void
    typealias failureParam = (_ error:String)->Void
