Inherits from NSObject
Declared in KiiThingQuery.h

Overview

A class that is representation of Thing Query object. This class should be instantiated with designated initializer. Calling init will throw an exception.

Properties

limit

The maximum number of results returned on response. Default is 0 which is no limit will be set into the query and use what is defined by server. This limit behaves in a best effort way, actual number of
returned result can be smaller than the requested number. If the specified limit is greater than the limit of the server, limit of the server will be applied.

@property (nonatomic, assign) unsigned int limit

Discussion

The maximum number of results returned on response. Default is 0 which is no limit will be set into the query and use what is defined by server. This limit behaves in a best effort way, actual number of
returned result can be smaller than the requested number. If the specified limit is greater than the limit of the server, limit of the server will be applied.

Declared In

KiiThingQuery.h

thingType

The thing type to filter the results.

@property (nonatomic, strong, nullable) NSString *thingType

Discussion

The thing type to filter the results.

Declared In

KiiThingQuery.h

Class Methods

thingQuery:groups:

Creates a query to search things owned by the specified user and groups. Both the owner and groupOwners parameter are optional, but at least one of them must be supplied.

+ (instancetype _Nonnull)thingQuery:(KiiUser *_Nullable)owner groups:(NSArray<KiiGroup*> *_Nullable)groups

Parameters

owner

KiiUser object must be current user.

groupOwners

List of groups must be belonged by current user.

Discussion

Creates a query to search things owned by the specified user and groups. Both the owner and groupOwners parameter are optional, but at least one of them must be supplied.

Exceptions

NSInvalidArgumentException

if both (owner and groups) are nil.

NSInvalidArgumentException

if groups contains non KiiGroup instance.

NSInvalidArgumentException

if groups contains group that does not have groupID.

NSInvalidArgumentException

if the owner is nil and groups is an empty array.

Declared In

KiiThingQuery.h