Skip to main content
RadarPlace represents a place. Learn more about Places.

Properties

_id
String
required
The Radar ID of the place.
name
String
required
The name of the place.
categories
Array<String>
required
The categories of the place. For a full list of categories, see Place Categories.
chain
RadarChain
The chain of the place, if known. May be nil for places without a chain. For a full list of chains, see Place Chains.
location
RadarCoordinate
required
The location of the place.
group
String
The group for the place, if any. For a full list of groups, see Place Groups.
metadata
NSDictionary
The metadata for the place, if part of a group. For details of metadata fields see Place Groups.
address
RadarAddress
The address of the place.

Methods

isChain

- (BOOL)isChain:(NSString *_Nullable)slug;
Returns a boolean indicating whether the place is part of the specified chain. Parameters:
  • slug - The chain slug to check
Returns: true if the place is part of the specified chain, false otherwise.

hasCategory

- (BOOL)hasCategory:(NSString *_Nullable)category;
Returns a boolean indicating whether the place has the specified category. Parameters:
  • category - The category to check
Returns: true if the place has the specified category, false otherwise.

arrayForPlaces

+ (NSArray<NSDictionary *> *_Nullable)arrayForPlaces:(NSArray<RadarPlace *> *_Nullable)places;
Converts an array of RadarPlace objects to an array of dictionaries.

dictionaryValue

- (NSDictionary *_Nonnull)dictionaryValue;
Returns the dictionary representation of the place.

Example

let place: RadarPlace = event.place
let placeId = place._id
let placeName = place.name
let placeCategories = place.categories
let placeChain = place.chain
let placeLocation = place.location

if place.isChain("starbucks") {
    // place is a Starbucks
}

if place.hasCategory("coffee-shop") {
    // place is a coffee shop
}
RadarPlace *place = event.place;
NSString *placeId = place._id;
NSString *placeName = place.name;
NSArray<NSString *> *placeCategories = place.categories;
RadarChain *placeChain = place.chain;
RadarCoordinate *placeLocation = place.location;

if ([place isChain:@"starbucks"]) {
    // place is a Starbucks
}

if ([place hasCategory:@"coffee-shop"]) {
    // place is a coffee shop
}

Build docs developers (and LLMs) love