ESTRequestAssignGPSLocation

@interface ESTRequestAssignGPSLocation : ESTRequestPutJSON

ESTRequestBeaconColor is used to assign GPS location to single beacon device. GPS Location can be provided during initialisation or taken automatically when nil provided.

  • Initialise request with beacon object

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBeacon:(nonnull CLBeacon *)beacon
                                  location:(nonnull CLLocation *)location;

    Swift

    init(beacon: CLBeacon, location: CLLocation)

    Parameters

    beacon

    beacon object for whom location should be assigned

    location

    Optional location of the device. When nil provided, GPS position will be taken automatically.

    Return Value

    initialised request

  • Initialise request with MAC address

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMacAddress:(nonnull NSString *)macAddress
                                      location:(nonnull CLLocation *)location;

    Swift

    init(macAddress: String, location: CLLocation)

    Parameters

    macAddress

    MAC address of beacon for whom location should be assigned

    location

    Optional location of the device. When nil provided, GPS position will be taken automatically.

    Return Value

    initialised request

  • Initialise request with Beacon parameters.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithProximityUUID:(nonnull NSUUID *)proximityUUID
                                            major:(CLBeaconMajorValue)major
                                            minor:(CLBeaconMinorValue)minor;

    Swift

    init(proximityUUID: UUID, major: CLBeaconMajorValue, minor: CLBeaconMinorValue)

    Parameters

    proximityUUID

    Beacon’s proximity UUID

    major

    Beacon’s major

    minor

    Beacon’s minor

    Return Value

    instance of request

  • Methods allows to send request with completion block invoked as a result.

    Declaration

    Objective-C

    - (void)sendRequestWithCompletion:
        (nonnull ESTRequestAssignGPSLocationBlock)completion;

    Swift

    func sendRequest(completion: @escaping ESTRequestAssignGPSLocationBlock)

    Parameters

    completion

    Completion block with returned data (CLLocation object).