Skip to content

Latest commit

 

History

History
131 lines (90 loc) · 3.89 KB

OfferApi.md

File metadata and controls

131 lines (90 loc) · 3.89 KB

EmonsiteApi\OfferApi

All URIs are relative to http://localhost.

Method HTTP request Description
getOfferCollection() GET /offers Retrieves the collection of OfferOutputDto resources.
getOfferItem() GET /offers/{id} Retrieves a OfferOutputDto resource.

getOfferCollection()

getOfferCollection($page, $itemsPerPage): \EmonsiteApi\Models\GetOfferCollection200Response

Retrieves the collection of OfferOutputDto resources.

Example

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


// Configure API key authorization: apiKey
$config = EmonsiteApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EmonsiteApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new EmonsiteApi\Api\OfferApi(
    // 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(),
    $config
);
$page = 1; // int | The collection page number
$itemsPerPage = 30; // int | The number of items per page

try {
    $result = $apiInstance->getOfferCollection($page, $itemsPerPage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OfferApi->getOfferCollection: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int The collection page number [optional] [default to 1]
itemsPerPage int The number of items per page [optional] [default to 30]

Return type

\EmonsiteApi\Models\GetOfferCollection200Response

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/ld+json, application/json, text/html

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

getOfferItem()

getOfferItem($id): \EmonsiteApi\Models\Offer9e545314e83938dc6f60861a54586191Jsonld

Retrieves a OfferOutputDto resource.

Example

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


// Configure API key authorization: apiKey
$config = EmonsiteApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EmonsiteApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new EmonsiteApi\Api\OfferApi(
    // 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(),
    $config
);
$id = 'id_example'; // string

try {
    $result = $apiInstance->getOfferItem($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OfferApi->getOfferItem: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string

Return type

\EmonsiteApi\Models\Offer9e545314e83938dc6f60861a54586191Jsonld

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/ld+json, application/json, text/html

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