All URIs are relative to https://cargomart.ru.
Method | HTTP request | Description |
---|---|---|
apiV2SettingGet() | GET /api/v2/setting | Получение списка настроек пользователя |
apiV2SettingNamePatch() | PATCH /api/v2/setting/{name} | Изменение значения настройки |
apiV2SettingGet(): \MagDv\Cargomart\Dto\SettingList
Получение списка настроек пользователя
Получение списка настроек пользователя
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');
// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new MagDv\Cargomart\Api\SettingApi(
// If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
// This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiV2SettingGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SettingApi->apiV2SettingGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\MagDv\Cargomart\Dto\SettingList
CookieTokenAuth, HeaderAuthorizationAuth
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV2SettingNamePatch($name, $setting_request): \MagDv\Cargomart\Dto\SettingList
Изменение значения настройки
Изменение значения настройки
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');
// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new MagDv\Cargomart\Api\SettingApi(
// If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
// This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
new GuzzleHttp\Client(),
$config
);
$name = 'name_example'; // string | Идентификатор настройки.
$setting_request = new \MagDv\Cargomart\Dto\SettingRequest(); // \MagDv\Cargomart\Dto\SettingRequest | Тело запроса.
try {
$result = $apiInstance->apiV2SettingNamePatch($name, $setting_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SettingApi->apiV2SettingNamePatch: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Идентификатор настройки. | |
setting_request | \MagDv\Cargomart\Dto\SettingRequest | Тело запроса. |
\MagDv\Cargomart\Dto\SettingList
CookieTokenAuth, HeaderAuthorizationAuth
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]