Skip to content

Updated constructor

Latest
Compare
Choose a tag to compare
@michael-roger michael-roger released this 24 Sep 00:45
0f3f896

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.