Read from the package's own PHP files at the commit 9f6acfa28a65: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
GoogleGatewayclassGoogle: the Places API (New) for anyone's place - its rating, its number of ratings, up to five reviews -, and the Business Profile API for the owner's - every review, and replying.
9 methods · 3 constants
GoogleGatewayFactoryclassGoogle reviews.
5 options · 1 method
Omnireview\Google
GoogleGateway class
final class GoogleGateway implements RatingInterface, ReviewsInterface, ReplyInterface, WriteUrlInterface GoogleGateway.php:31
Google: the Places API (New) for anyone's place - its rating, its number of ratings, up to five reviews -, and the Business Profile API for the owner's - every review, and replying.
- Places: GET https://places.googleapis.com/v1/places/{placeId}, X-Goog-Api-Key, X-Goog-FieldMask;
- Business Profile: OAuth 2.0 (the owner's refresh token, scope business.manage), GET https://mybusiness.googleapis.com/v4/{accounts/a/locations/l}/reviews, PUT .../reviews/{reviewId}/reply.
const PLACES = 'https://places.googleapis.com/v1/places/'const BUSINESS = 'https://mybusiness.googleapis.com/v4/'const TOKEN = 'https://oauth2.googleapis.com/token'
GoogleGateway::__construct()
public function __construct(readonly HttpClientInterface $http, readonly ?string $apiKey = null, readonly ?string $clientId = null, readonly ?string $clientSecret = null, readonly ?string $refreshToken = null, readonly ?string $language = null)GoogleGateway::getName()
public function getName(): stringGoogleGateway::getTitle()
public function getTitle(): stringGoogleGateway::capabilities()
public function capabilities(): CapabilitiesGoogleGateway::terms()
public function terms(): TermsGoogleGateway::rating()
public function rating(Place $place): RatingGoogleGateway::reviews()
public function reviews(Place $place, int $limit = 5, ?string $language = null): arrayGoogleGateway::reply()
public function reply(Place $place, Review $review, string $text): ReplyGoogleGateway::writeUrl()
public function writeUrl(Place $place): stringGoogleGatewayFactory class
final class GoogleGatewayFactory extends GatewayFactory GoogleGatewayFactory.php:25
Google reviews.
options: api_key: '%env(GOOGLE_PLACES_KEY)%' # the Places API (New): anyone's place, up to five reviews language: fr # the reviews' language (languageCode) # the owner's side, the Business Profile API: every review, replying client_id: '%env(default::GOOGLE_CLIENT_ID)%' client_secret: '%env(default::GOOGLE_CLIENT_SECRET)%' refresh_token: '%env(default::GOOGLE_REFRESH_TOKEN)%' # granted once by the owner, scope business.manage
The api_key, the owner's three, or both.
Options
| Option | Default | |
|---|---|---|
api_key | null | |
language | null | |
client_id | null | |
client_secret | null | |
refresh_token | null |
GoogleGatewayFactory::__construct()
public function __construct(readonly ?HttpClientInterface $http = null)