Skip to content

Latest commit

 

History

History
240 lines (172 loc) · 7.56 KB

UserApi.md

File metadata and controls

240 lines (172 loc) · 7.56 KB

RadioManager\UserApi

All URIs are relative to https://radiomanager.io/api/v2

Method HTTP request Description
deleteUserById DELETE /users/{id} Remove user from station by Id
getUserById GET /users/{id} Get user by id
inviteUserByMail POST /users/invite Invite user by mail
listUsers GET /users Get all users.

deleteUserById

\RadioManager\Model\Success deleteUserById($id)

Remove user from station by Id

Remove user from station by Id

Example

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

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

$apiInstance = new RadioManager\Api\UserApi(
    // 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 = 789; // int | id of User

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

Parameters

Name Type Description Notes
id int id of User

Return type

\RadioManager\Model\Success

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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

getUserById

\RadioManager\Model\UserResult getUserById($id)

Get user by id

Get user by id

Example

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

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

$apiInstance = new RadioManager\Api\UserApi(
    // 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 = 789; // int | id of User

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

Parameters

Name Type Description Notes
id int id of User

Return type

\RadioManager\Model\UserResult

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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

inviteUserByMail

\RadioManager\Model\InviteUserSuccess inviteUserByMail($data)

Invite user by mail

Invite user by mail

Example

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

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

$apiInstance = new RadioManager\Api\UserApi(
    // 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
);
$data = new \RadioManager\Model\InviteUserData(); // \RadioManager\Model\InviteUserData | Data **(Required)**

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

Parameters

Name Type Description Notes
data \RadioManager\Model\InviteUserData Data (Required)

Return type

\RadioManager\Model\InviteUserSuccess

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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

listUsers

\RadioManager\Model\UserResults listUsers($page, $role_id, $limit, $order_by, $order_direction)

Get all users.

List all users.

Example

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

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

$apiInstance = new RadioManager\Api\UserApi(
    // 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 | Current page *(Optional)*
$role_id = 789; // int | Search on Role ID *(Optional)*
$limit = 789; // int | Results per page *(Optional)*
$order_by = "order_by_example"; // string | Field to order the results *(Optional)*
$order_direction = "order_direction_example"; // string | Direction of ordering *(Optional)*

try {
    $result = $apiInstance->listUsers($page, $role_id, $limit, $order_by, $order_direction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->listUsers: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int Current page (Optional) [optional] [default to 1]
role_id int Search on Role ID (Optional) [optional]
limit int Results per page (Optional) [optional]
order_by string Field to order the results (Optional) [optional]
order_direction string Direction of ordering (Optional) [optional]

Return type

\RadioManager\Model\UserResults

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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