Skip to content

Latest commit

 

History

History
142 lines (97 loc) · 5.02 KB

SettingApi.md

File metadata and controls

142 lines (97 loc) · 5.02 KB

MagDv\Cargomart\SettingApi

All URIs are relative to https://cargomart.ru.

Method HTTP request Description
apiV2SettingGet() GET /api/v2/setting Получение списка настроек пользователя
apiV2SettingNamePatch() PATCH /api/v2/setting/{name} Изменение значения настройки

apiV2SettingGet()

apiV2SettingGet(): \MagDv\Cargomart\Dto\SettingList

Получение списка настроек пользователя

Получение списка настроек пользователя

Example

<?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;
}

Parameters

This endpoint does not need any parameter.

Return type

\MagDv\Cargomart\Dto\SettingList

Authorization

CookieTokenAuth, HeaderAuthorizationAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

apiV2SettingNamePatch()

apiV2SettingNamePatch($name, $setting_request): \MagDv\Cargomart\Dto\SettingList

Изменение значения настройки

Изменение значения настройки

Example

<?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;
}

Parameters

Name Type Description Notes
name string Идентификатор настройки.
setting_request \MagDv\Cargomart\Dto\SettingRequest Тело запроса.

Return type

\MagDv\Cargomart\Dto\SettingList

Authorization

CookieTokenAuth, HeaderAuthorizationAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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