SPQuery
Objective-C
@interface SPQuery : NSObject
Swift
class SPQuery : NSObject
Abstraction of query parameters used with Steerpath Meta Service. Supports a simplified set of parameters used for most common use cases.
-
Set sources for query. Corresponds to the “sources” URL parameter.
By default you can leave this empty.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *sources;
Swift
var sources: [String]? { get set }
-
Set a list of tags for query. Corresponds to the “tags_any” URL parameter.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *tags;
Swift
var tags: [String]? { get set }
-
Limit query results to a single building. Corresponds to the “building” URL parameter.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *building;
Swift
var building: String? { get set }
-
Limit query results to a local ref.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *localRef;
Swift
var localRef: String? { get set }
-
Set an asset tracking identifier for query. Corresponds to the “assetTrackingIds” URL parameter. Only works for assets related APIs.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *assetTrackingId;
Swift
var assetTrackingId: String? { get set }
-
Limit query results based on area availability. Corresponds to the “hasArea” URL parameter.
Declaration
Objective-C
@property (nonatomic) BOOL hasArea;
Swift
var hasArea: Bool { get set }
-
Limit your query to only target data for a specific floor level. Use an integer value. Corresponds to “floor” URL parameter
Above ground level: floor > 0
Ground level: floor == 0
Below ground level: floor < 0
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSNumber *floor;
Swift
@NSCopying var floor: NSNumber? { get set }
-
a GPS coordinate for query. Filters search by location. If you use this you must use ‘radius’ property in your query as well. Corresponds to “lat” and “lon” URL parameters.
‘coordinate’ + ‘radius’ query can not be combined with a bounding box query.
Declaration
Objective-C
@property (nonatomic) CLLocationCoordinate2D coordinate;
Swift
var coordinate: CLLocationCoordinate2D { get set }
-
Set radius for query. Filters search by radius in meters. If you use this you must use ‘coordinate’ property in your query as well. Corresponds to “radius” URL parameter
‘coordinate’ + ‘radius’ query can not be combined with a bounding box query.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSNumber *radius;
Swift
@NSCopying var radius: NSNumber? { get set }
-
Set bounding box for query. Filters search with a bounding box consisting of two GPS coordinates. Corresponds to “bbox” URL parameter
‘bbox’ query can not be combined with a ‘coordinate’ + ‘radius’ query.
Declaration
Objective-C
@property (nonatomic, strong, nullable) SPBoundingBox *bbox;
Swift
var bbox: SPBoundingBox? { get set }
-
Declaration
Objective-C
- (nonnull NSDictionary *)params;
Swift
func params() -> [AnyHashable : Any]
Return Value
dictionary containing available parameters compatible with Steerpath Meta Service API queries
-
Declaration
Objective-C
- (BOOL)isValid;
Swift
func isValid() -> Bool
Return Value
true if query contains valid data for executing a query to Steerpath Meta Service