Skip to content

Commit

Permalink
Support all placeFields when calling lookUpPlaceByID
Browse files Browse the repository at this point in the history
  • Loading branch information
tolu360 committed Jun 27, 2019
1 parent 6ef4ee1 commit 85a7858
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,8 @@ OR

**PLACE FIELDS**
- To prevent yourself from incurring huge usage bill, you can select the result fields you need in your application. Pass an *(optional)* `placeFields` as the second param to `lookUpPlaceByID`.
- **placeFields** is an **`Array`** of `String` such as `placeID`, `location`, `name`, `address`, `types`, `openingHours`, `plusCode`, `rating`, `userRatingsTotal`, `viewport`.
- **placeFields** is an **`Array`** of `String` such as `placeID`, `location`, `name`, `address`, `types`, `openingHours`, `plusCode`, `rating`, `userRatingsTotal`, `viewport`, `addressComponents`, `website`, `phoneNumber`, and `phoneNumber`.
- Defaults to an empty array which returns every field possible for the particular place.
- Place note that requesting for `website`, `phoneNumber`, `phoneNumber` and `addressComponents` are not supported when calling `lookUpPlaceByID`.

#### Example Response from Calling lookUpPlaceByID()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public void lookUpPlaceByID(String placeID, ReadableArray fields, final Promise
return;
}

List<Place.Field> selectedFields = getPlaceFields(fields.toArrayList(), true);
List<Place.Field> selectedFields = getPlaceFields(fields.toArrayList(), false);

FetchPlaceRequest request = FetchPlaceRequest.builder(placeID, selectedFields).build();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "iOS/Android Google Places Widgets (Autocomplete Modals) and API Services for React Native Apps",
"main": "index.js",
"author": "Tolu Olowu (Arttitude 360) <tolu@arttitude360.com>",
"version": "3.1.0",
"version": "3.1.1",
"scripts": {},
"repository": {
"type": "git",
Expand Down

0 comments on commit 85a7858

Please sign in to comment.