question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PlacesDetailsRequest

See original GitHub issue

I have a question about using Enum.Fields I am making this request:

var detailsResponse = await GooglePlaces.Details.QueryAsync(new PlacesDetailsRequest
            {
                Key = GoogleApiKey,
                PlaceId = placeId,
                  //Fields = [FieldTypes.Formatted_Address, FieldTypes.International_Phone_Number, FieldTypes.Website],
            });

I am trying to access these fields but they return null for a reason i understand that the Fields are set to: public virtual FieldTypes Fields { get; set; } = FieldTypes.Basic; is it possible to change the FieldType?

when i make the call by doing this:

var detailsResult = detailsResponse.Result; 
airportDetail.PhoneNumber = detailsResult.InternationalPhoneNumber;
airportDetail.Website = detailsResult.Website;

these are null. how can i access them by the way i comment them in the detailsResponse above?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vivetcommented, Oct 8, 2019

Use | between each if the values in the enum you want

0reactions
josephbalescommented, Sep 15, 2021

Use | between each if the values in the enum you want

Might be worth adding this to the readme as it may not be obvious to the average user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Place Details | Places API
A Place Details request returns more comprehensive information about the indicated place such as its complete address, phone number, user rating and reviews ......
Read more >
Places API Usage and Billing
The Autocomplete requests and the Places Details requests using sessions are billed on different SKUs. About Places Data SKUs. The three Places Data...
Read more >
How to get all place details from a Place Details Request ...
I am trying to get data, like phone numbers, from a Place Details Request using The Google Places API Web Service. I am...
Read more >
Get Place Details From Place ID – Google Maps API Example
Place Details Request lets you get more comprehensive information about a specific place using place_id. The place_id can be found on each ...
Read more >
Place Details Field Filtering | Maps Platform Best Practices
Place Details Field Filtering. Pricing for Places API requests is tiered and based on which categories of fields are returned. Google ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found