All URIs are relative to http://localhost.
Method | HTTP request | Description |
---|---|---|
getCategoriesCollection() | GET /api/categories | Retrieves the collection of Categories resources. |
getCategoriesItem() | GET /api/categories/{id} | Retrieves a Categories resource. |
postCategoriesCollection() | POST /api/categories | Creates a Categories resource. |
putCategoriesItem() | PUT /api/categories/{id} | Replaces the Categories resource. |
getCategoriesCollection($page): \ProductApi\Model\CategoriesRead[]
Retrieves the collection of Categories resources.
Retrieves the collection of Categories resources.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
$config = ProductApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ProductApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new ProductApi\Api\CategoriesApi(
// 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
try {
$result = $apiInstance->getCategoriesCollection($page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->getCategoriesCollection: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
page | int | The collection page number | [optional] [default to 1] |
\ProductApi\Model\CategoriesRead[]
- Content-Type: Not defined
- Accept:
application/json
,text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getCategoriesItem($id): \ProductApi\Model\CategoriesRead
Retrieves a Categories resource.
Retrieves a Categories resource.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
$config = ProductApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ProductApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new ProductApi\Api\CategoriesApi(
// 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 | Resource identifier
try {
$result = $apiInstance->getCategoriesItem($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->getCategoriesItem: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Resource identifier |
\ProductApi\Model\CategoriesRead
- Content-Type: Not defined
- Accept:
application/json
,text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
postCategoriesCollection($categories_write): \ProductApi\Model\CategoriesRead
Creates a Categories resource.
Creates a Categories resource.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
$config = ProductApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ProductApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new ProductApi\Api\CategoriesApi(
// 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
);
$categories_write = new \ProductApi\Model\CategoriesWrite(); // \ProductApi\Model\CategoriesWrite | The new Categories resource
try {
$result = $apiInstance->postCategoriesCollection($categories_write);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->postCategoriesCollection: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
categories_write | \ProductApi\Model\CategoriesWrite | The new Categories resource |
\ProductApi\Model\CategoriesRead
- Content-Type:
application/json
,text/html
- Accept:
application/json
,text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
putCategoriesItem($id, $categories_write): \ProductApi\Model\CategoriesRead
Replaces the Categories resource.
Replaces the Categories resource.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
$config = ProductApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ProductApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new ProductApi\Api\CategoriesApi(
// 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 | Resource identifier
$categories_write = new \ProductApi\Model\CategoriesWrite(); // \ProductApi\Model\CategoriesWrite | The updated Categories resource
try {
$result = $apiInstance->putCategoriesItem($id, $categories_write);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->putCategoriesItem: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Resource identifier | |
categories_write | \ProductApi\Model\CategoriesWrite | The updated Categories resource |
\ProductApi\Model\CategoriesRead
- Content-Type:
application/json
,text/html
- Accept:
application/json
,text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]