ESTRequestGetDevices

@interface ESTRequestGetDevices : ESTRequestGetJSON

Allows to get user’s devices details from the Estimote Cloud API.

  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithIdentifiers:(nullable NSArray<NSString *> *)identifiers
                       type:(ESTRequestGetDevicesTypeMask)deviceType
                       page:(nonnull NSNumber *)page;

    Swift

    init(identifiers: [String]?, type deviceType: ESTRequestGetDevicesTypeMask, page: NSNumber)

    Parameters

    identifiers

    List of device identifiers to fetch. Identifiers should be separated by comma. If nil, then all devices within defined range will be fetched.

    deviceType

    Device types, which will be returned.

    page

    From which page data should be returned.

    Return Value

    Initialized request.

  • Convenience initializer returning devices with given identifiers and devices’ types. Note it has no page parameter, so this method will initialize a request fetching up to 100 devices.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithIdentifiers:(nullable NSArray<NSString *> *)identifiers
                       type:(ESTRequestGetDevicesTypeMask)deviceType;

    Swift

    convenience init(identifiers: [String]?, type deviceType: ESTRequestGetDevicesTypeMask)

    Parameters

    identifiers

    List of device identifiers to fetch. Identifiers should be separated by comma. If nil, then all devices within defined range will be fetched.

    deviceType

    List of device type which will be returned.

    Return Value

    Initialized request.

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

    Declaration

    Objective-C

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

    Swift

    func sendRequest(completion: @escaping ESTRequestGetDevicesBlock)

    Parameters

    completion

    Request completion block. No error means request was successful.