Skip to content

omnireview/tripadvisor API reference

Floor
Provider · Omnireview
Version
1.x
Conformance suite
not wired
Verified for real
Verified in part
Licence
MIT
composer require omnireview/tripadvisor:1.x-dev

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.

Omnireview\Tripadvisor

  • TripadvisorGateway class

    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.

    8 methods · 1 constant

  • TripadvisorGatewayFactory class

    Tripadvisor'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(): string

TripadvisorGateway::getTitle()

public function getTitle(): string

TripadvisorGateway::capabilities()

public function capabilities(): Capabilities

TripadvisorGateway::terms()

public function terms(): Terms

TripadvisorGateway::rating()

public function rating(Place $place): Rating

TripadvisorGateway::reviews()

public function reviews(Place $place, int $limit = 5, ?string $language = null): array

TripadvisorGateway::writeUrl()

public function writeUrl(Place $place): string

TripadvisorGatewayFactory 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

OptionDefault
language'en'
referernull
api_keyrequired

TripadvisorGatewayFactory::__construct()

public function __construct(readonly ?HttpClientInterface $http = null)