Skip to content

Latest commit

 

History

History
122 lines (81 loc) · 3.43 KB

UsersApi.md

File metadata and controls

122 lines (81 loc) · 3.43 KB

Equisoft\SDK\EquisoftConnect\UsersApi

All URIs are relative to http://localhost, except if the operation defines another base path.

Method HTTP request Description
getCurrentUser() GET /crm/api/v1/users/me Get informations about the current user
getUserContext() GET /crm/api/v1/context Get user context metadata.

getCurrentUser()

getCurrentUser($acceptLanguage): \Equisoft\SDK\EquisoftConnect\Model\UsersUser

Get informations about the current user

Example

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


// Configure OAuth2 access token for authorization: OAuth2
$config = Equisoft\SDK\EquisoftConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Equisoft\SDK\EquisoftConnect\Api\UsersApi(
    // 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
);
$acceptLanguage = 'acceptLanguage_example'; // string | Specify preferred language for returned data. Format is https://tools.ietf.org/html/rfc3282.

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

Parameters

Name Type Description Notes
acceptLanguage string Specify preferred language for returned data. Format is https://tools.ietf.org/html/rfc3282. [optional]

Return type

\Equisoft\SDK\EquisoftConnect\Model\UsersUser

Authorization

OAuth2

HTTP request headers

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

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

getUserContext()

getUserContext(): \Equisoft\SDK\EquisoftConnect\Model\ContextUserContext

Get user context metadata.

Example

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


// Configure OAuth2 access token for authorization: OAuth2
$config = Equisoft\SDK\EquisoftConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Equisoft\SDK\EquisoftConnect\Api\UsersApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\Equisoft\SDK\EquisoftConnect\Model\ContextUserContext

Authorization

OAuth2

HTTP request headers

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

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