PlacesAPI
public enum PlacesAPI
                Caseless enumeration with static methods to send Places Requests
- 
                  
                  
Sends a request to get the list of places.
Declaration
Swift
public static func getPlaces(with parameters: Parameters?, completion: ResponseCompletion<[Place]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get the list of places given a query string.
Declaration
Swift
public static func getPlaces(query: String, with parameters: Parameters?, completion: ResponseCompletion<[Place]> = nil)Parameters
queryThe string to search for.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get the list of places given a place Integration ID.
Declaration
Swift
public static func getPlaces(integrationId: String, with parameters: Parameters?, completion: ResponseCompletion<[Place]> = nil)Parameters
integrationIdThe integration ID of the place.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get the list of places nearby based on given coordinates.
Declaration
Swift
public static func getPlacesNearby(coordinates: (latitude: Double, longitude: Double), onlyWithClientEvents: Bool, with parameters: Parameters?, completion: ResponseCompletion<[Place]> = nil)Parameters
coordinatesThe coordinates to base the search on.
onlyWithClientEventsThe boolean value to check if user wants to display places with client events only.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get the list of places nearby based on address.
Declaration
Swift
public static func getPlacesNearby(address: String, onlyWithClientEvents: Bool, with parameters: Parameters?, completion: ResponseCompletion<[Place]> = nil)Parameters
addressThe address to base the search on.
onlyWithClientEventsThe boolean value to check if user wants to display places with client events only.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get the list of offers related to a place given client event type.
Declaration
Swift
public static func getOffers(placeId: Int, clientEventType: Place.ClientEventType, with parameters: Parameters?, completion: ResponseCompletion<[Offer]> = nil)Parameters
placeIdThe id of the place.
clientEventTypeThe
ClientEventTypeto apply.parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get the place detail given a place ID.
Declaration
Swift
public static func getPlace(id: Int, with parameters: Parameters?, completion: ResponseCompletion<Place> = nil)Parameters
idThe id of the place.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get the list of place categories.
Declaration
Swift
public static func getPlaceCategories(with parameters: Parameters?, completion: ResponseCompletion<[Place.Category]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get the radius, centerpoint, and list of places
Declaration
Swift
public static func getPlacesNearby(with parameters: Parameters?, completion: ResponseCompletion<NearbyPlaces> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 
View on GitHub
        PlacesAPI Enumeration Reference