Android SDK Version
  • java.lang.Object
    • com.facebook.places.model.PlaceSearchRequestParams.Builder
Enclosing class:

public static class PlaceSearchRequestParams.Builder
extends java.lang.Object
Describes the builder to create a PlaceSearchRequestParams
Constructor Summary
Constructor and Description
Builder() 
Method Summary
Modifier and TypeMethod and Description
PlaceSearchRequestParams.BuilderaddCategory(java.lang.String category)
Add a place category to restrict the search results.
PlaceSearchRequestParams.BuilderaddField(java.lang.String field)
Add a place information field to the list of fields to be returned.
PlaceSearchRequestParamsbuild()
PlaceSearchRequestParams.BuildersetDistance(int distance)
Sets the maximum search radius in meters.
PlaceSearchRequestParams.BuildersetLimit(int limit)
Sets the maximum number of places to be returned.
PlaceSearchRequestParams.BuildersetSearchText(java.lang.String searchText)
Sets the name of the place to search for.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

Builder

public Builder()
Method Detail

setDistance

public PlaceSearchRequestParams.Builder setDistance(int distance)
Sets the maximum search radius in meters. If PlaceManager.newPlaceSearchRequest() is used, then this parameter defines the maximum search radius around the current device location. If PlaceManager.newPlaceSearchRequestForLocation() is used, then this parameter defines the maximum search radius around the specified location.
Parameters:
distance - The maximum distance in meters.
Returns:
The builder.

setLimit

public PlaceSearchRequestParams.Builder setLimit(int limit)
Sets the maximum number of places to be returned.
Parameters:
limit - The maximum number of places to return.
Returns:
The builder.

setSearchText

public PlaceSearchRequestParams.Builder setSearchText(java.lang.String searchText)
Sets the name of the place to search for. If this parameter is not specified, then you must supply a location, and the response will contain places that are near the given location.
Parameters:
searchText - The name of the place to search for.
Returns:
The builder.

addCategory

public PlaceSearchRequestParams.Builder addCategory(java.lang.String category)
Add a place category to restrict the search results. Refer to the online Places Graph documentation to see the list of supported categories.
Parameters:
category - The name of the place category to add as a filter.
Returns:
The builder.

addField

public PlaceSearchRequestParams.Builder addField(java.lang.String field)
Add a place information field to the list of fields to be returned. Refer to PlaceFields for a list of fields. Refer to the online Places Graph documentation for the current list of supported fields.
Parameters:
field - The field to be returned in the place search response.
Returns:
The builder.

build

public PlaceSearchRequestParams build()