Aller au contenu

omnireview/tripadvisor Référence de l’API

Étage
Fournisseur · Omnireview
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Vérifié en partie
Licence
MIT
composer require omnireview/tripadvisor:1.x-dev

Lue dans les fichiers PHP du paquet au commit 85734c86ad31 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

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)