Skip to content

Latest commit

 

History

History
265 lines (188 loc) · 8.71 KB

RestaurantApi.md

File metadata and controls

265 lines (188 loc) · 8.71 KB

Swagger\Client\RestaurantApi

All URIs are relative to /

Method HTTP request Description
appRestaurantSettings GET /api/v{version}/restaurants/{restaurantUid}/appsettings Gets app settings of the restaurant. This can only be called by Apps.
restaurantGet GET /api/v{version}/restaurants Get restaurant list
restaurantGetByUid GET /api/v{version}/restaurants/{restaurantUid} Get restaurant
restaurantGetReviewSummary GET /api/v{version}/restaurants/{restaurantUid}/reviewsummary/{dateFrom} Get reviews summary
restaurantGetReviews GET /api/v{version}/restaurants/{restaurantUid}/reviews Get reviews

appRestaurantSettings

\Swagger\Client\Model\RestaurantAppSettingsViewModel appRestaurantSettings($restaurant_uid, $version)

Gets app settings of the restaurant. This can only be called by Apps.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\RestaurantApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$restaurant_uid = "restaurant_uid_example"; // string | The unique identifier of the restaurant.
$version = "version_example"; // string | 

try {
    $result = $apiInstance->appRestaurantSettings($restaurant_uid, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RestaurantApi->appRestaurantSettings: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
restaurant_uid string The unique identifier of the restaurant.
version string

Return type

\Swagger\Client\Model\RestaurantAppSettingsViewModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restaurantGet

\Swagger\Client\Model\RestaurantViewModel[] restaurantGet($version)

Get restaurant list

Get the list of restaurants you are authorized to

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\RestaurantApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$version = "version_example"; // string | 

try {
    $result = $apiInstance->restaurantGet($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RestaurantApi->restaurantGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
version string

Return type

\Swagger\Client\Model\RestaurantViewModel[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restaurantGetByUid

\Swagger\Client\Model\RestaurantViewModel restaurantGetByUid($restaurant_uid, $version)

Get restaurant

Get restaurant by uid if you are authorized to

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\RestaurantApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$restaurant_uid = "restaurant_uid_example"; // string | The unique identifier of the restaurant.
$version = "version_example"; // string | 

try {
    $result = $apiInstance->restaurantGetByUid($restaurant_uid, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RestaurantApi->restaurantGetByUid: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
restaurant_uid string The unique identifier of the restaurant.
version string

Return type

\Swagger\Client\Model\RestaurantViewModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restaurantGetReviewSummary

\Swagger\Client\Model\ReviewSummaryViewModel restaurantGetReviewSummary($restaurant_uid, $version, $date_from)

Get reviews summary

Get a summary of reviews for this restaurant.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\RestaurantApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$restaurant_uid = "restaurant_uid_example"; // string | The unique identifier of the restaurant.
$version = "version_example"; // string | 
$date_from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The date to check the reviews from to create the summary. This parameter is optional.

try {
    $result = $apiInstance->restaurantGetReviewSummary($restaurant_uid, $version, $date_from);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RestaurantApi->restaurantGetReviewSummary: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
restaurant_uid string The unique identifier of the restaurant.
version string
date_from \DateTime The date to check the reviews from to create the summary. This parameter is optional. [optional]

Return type

\Swagger\Client\Model\ReviewSummaryViewModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restaurantGetReviews

\Swagger\Client\Model\ReviewViewModel[] restaurantGetReviews($restaurant_uid, $version)

Get reviews

Get a list of reviews for this restaurant

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\RestaurantApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$restaurant_uid = "restaurant_uid_example"; // string | The unique identifier of the restaurant.
$version = "version_example"; // string | 

try {
    $result = $apiInstance->restaurantGetReviews($restaurant_uid, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RestaurantApi->restaurantGetReviews: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
restaurant_uid string The unique identifier of the restaurant.
version string

Return type

\Swagger\Client\Model\ReviewViewModel[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]