Releases: varsitynewsnetwork/php-google-places-api
Updated constructor
The PlaceService now has an updated constructor.
/**
* @param ClientInterface $client
* @param string|null $googleApiKey
*/
public function __construct(ClientInterface $client, ?string $googleApiKey = null)
{
$this->client = $client;
$this->googleApiKey = $googleApiKey;
}
You can pass in (optionally) a Google api key to be used with your requests.
The setApiKey() method is still available to use, too.
Add optional parameters to text search and find place
This release adds an $optionalParams array to textSearch, findPlace, and detail. You can use this array to specify things like
['locationbias' => 'point:42.9758987,-85.6758428', 'language' => 'fr']
for find place requests, or
['type' => 'night_club', 'location' => '42.9758987,-85.6758428', 'radius' => '10000']
for text searches.
This release also allows clients to specify output fields on place details requests, which can help control costs when using the Google Place API.
Note that because text search returns all fields by default, the method signature of textSearch differs from both findPlace and detail.
Find Place from Text Support
This release adds findplacefromtext API support, adds a ->findPlace() method, and clearly distinguishes textsearch requests by changing the ->search() method to ->textSearch().
Fixing errors with details()
Merge pull request #5 from mrkrstphr/fixes Fixing some logic errors with how detail results are returned
Place details
- Implemented the ability to get details on a place by
placeid
Initial Release
Go forth and be awesome.