public class PlacesClient extends AbstractClient
AbstractClient.LibraryVersion
Constructor and Description |
---|
PlacesClient()
Create a new unauthenticated Algolia Places client.
|
PlacesClient(String applicationID,
String apiKey)
Create a new authenticated Algolia Places client.
|
Modifier and Type | Method and Description |
---|---|
JSONObject |
getByObjectID(String objectID)
Get a place by its objectID.
|
Request |
searchAsync(PlacesQuery params,
CompletionHandler completionHandler)
Search for places.
|
addUserAgent, getApplicationID, getConnectTimeout, getHeader, getHostDownDelay, getReadHosts, getReadTimeout, getSearchTimeout, getUserAgents, getWriteHosts, hasUserAgent, removeUserAgent, setCompletionExecutor, setConnectTimeout, setHeader, setHostDownDelay, setHosts, setReadHosts, setReadTimeout, setSearchTimeout, setWriteHosts
public PlacesClient(@NonNull String applicationID, @NonNull String apiKey)
applicationID
- The application ID (available in your Algolia Dashboard).apiKey
- A valid API key for the service.public PlacesClient()
public Request searchAsync(@NonNull PlacesQuery params, @NonNull CompletionHandler completionHandler)
params
- Search parameters.completionHandler
- The listener that will be notified of the request's outcome.public JSONObject getByObjectID(@NonNull String objectID) throws AlgoliaException
objectID
- the record's identifier.AlgoliaException
- when the given objectID does not exist.