PlacesClient
@objcMembers
public class PlacesClient : AbstractClient
Client for Algolia Places.
-
Algolia application ID.
Declaration
Swift
@objc public var appID: String? { get } -
Algolia API key.
Declaration
Swift
@objc public var apiKey: String? { get set }
-
Create a new authenticated Algolia Places client.
Declaration
Swift
@objc public init(appID: String, apiKey: String)Parameters
appIDThe application ID (available in your Algolia Dashboard).
apiKeyA valid API key for the service.
-
Create a new unauthenticated Algolia Places client.
Note
The rate limit for the unauthenticated API is significantly lower than for the authenticated API.Declaration
Swift
@objc public init()
-
Search for places.
Declaration
Swift
@discardableResult @objc(search:completionHandler:) public func search(_ params: PlacesQuery, completionHandler: @escaping CompletionHandler) -> OperationParameters
paramsSearch parameters.
completionHandlerCompletion handler to be notified of the request’s outcome.
Return Value
A cancellable operation.
-
Get a place by its objectID.
Declaration
Swift
@discardableResult @objc public func getObject(withID objectID: String, completionHandler: @escaping CompletionHandler) -> OperationParameters
objectIDIdentifier of the object to retrieve.
completionHandlerCompletion handler to be notified of the request’s outcome.
Return Value
A cancellable operation.
PlacesClient Class Reference