Class: PlaceDetailParser

lucid.maps.places. PlaceDetailParser

Parses information from the place object returned from the Google Places service.This class acts as a wrapper around the Google place objectand provides methods to parse information from the wrapped object.

new PlaceDetailParser(place)

Parameters:
Name Type Description
place google.maps.places.PlaceResult The place we want the details from.
Source:

Methods

getOpeningHours(day) → {string}

Get the opening hours for the specified day of the week.This may be undefined. Use the hasOpeningHours function to test if the opening hours exist.
Parameters:
Name Type Description
day number The zero-based index of the day of the week. With 0 being Monday.
Source:
Returns:
The opening hours for the current day of the week.
Type
string

getOpeningHoursToday() → {string}

Get the opening hours for the current day of the week.This may be undefined. Use the hasOpeningHours function to test if the opening hours exist.
Source:
Returns:
The opening hours for the current day of the week.
Type
string

getRating() → {number}

Get the rating given to the place.This may be undefined. Use the hasRating function to test if the rating exists.
Source:
Returns:
The place's rating.
Type
number

hasOpeningHours() → {boolean}

Check if the place has defined its opening hours.
Source:
Returns:
True if the place has opening hours defined.
Type
boolean

hasRating() → {boolean}

Check if the place has been given a rating.
Source:
Returns:
True if the place has a rating.
Type
boolean