Read from the package's own PHP files at the commit 85734c86ad31: 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.
TripadvisorGatewayclassTripadvisor's Content API: a location's details (rating, num_reviews, web_url, write_review, the bubbles' picture) and its reviews - up to five, the most recent. The partner key in the query.
8 methods · 1 constant
TripadvisorGatewayFactoryclassTripadvisor's Content API.
3 options · 1 method
Omnireview\Tripadvisor
TripadvisorGateway class
final class TripadvisorGateway implements RatingInterface, ReviewsInterface, WriteUrlInterface TripadvisorGateway.php:24
Tripadvisor's Content API: a location's details (rating, num_reviews, web_url, write_review, the bubbles' picture) and its reviews - up to five, the most recent. The partner key in the query.
const URL = 'https://api.content.tripadvisor.com/api/v1/location/'
TripadvisorGateway::__construct()
public function __construct(readonly HttpClientInterface $http, readonly string $apiKey, readonly string $language = 'en', readonly ?string $referer = null)TripadvisorGateway::getName()
public function getName(): stringTripadvisorGateway::getTitle()
public function getTitle(): stringTripadvisorGateway::capabilities()
public function capabilities(): CapabilitiesTripadvisorGateway::terms()
public function terms(): TermsTripadvisorGateway::rating()
public function rating(Place $place): RatingTripadvisorGateway::reviews()
public function reviews(Place $place, int $limit = 5, ?string $language = null): arrayTripadvisorGateway::writeUrl()
public function writeUrl(Place $place): stringTripadvisorGatewayFactory class
final class TripadvisorGatewayFactory extends GatewayFactory TripadvisorGatewayFactory.php:19
Tripadvisor's Content API.
options: api_key: '%env(TRIPADVISOR_KEY)%' # required: the partner key (restricted to the site's domains or addresses) language: fr # en by default referer: https://www.example.org/ # the Referer sent, for a key restricted to domains
Options
| Option | Default | |
|---|---|---|
language | 'en' | |
referer | null | |
api_key | required |
TripadvisorGatewayFactory::__construct()
public function __construct(readonly ?HttpClientInterface $http = null)