Skip to content

Latest commit

 

History

History
229 lines (160 loc) · 6.25 KB

UserApi.md

File metadata and controls

229 lines (160 loc) · 6.25 KB

RadioManagerClient::UserApi

Load the API package

use RadioManagerClient::Object::UserApi;

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

Method HTTP request Description
delete_user_by_id DELETE /users/{id} Remove user from station by Id
get_user_by_id GET /users/{id} Get user by id
invite_user_by_mail POST /users/invite Invite user by mail
list_users GET /users Get all users.

delete_user_by_id

Success delete_user_by_id(id => $id)

Remove user from station by Id

Remove user from station by Id

Example

use Data::Dumper;
use RadioManagerClient::UserApi;
my $api_instance = RadioManagerClient::UserApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $id = 789; # int | id of User

eval { 
    my $result = $api_instance->delete_user_by_id(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->delete_user_by_id: $@\n";
}

Parameters

Name Type Description Notes
id int id of User

Return type

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]

get_user_by_id

UserResult get_user_by_id(id => $id)

Get user by id

Get user by id

Example

use Data::Dumper;
use RadioManagerClient::UserApi;
my $api_instance = RadioManagerClient::UserApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $id = 789; # int | id of User

eval { 
    my $result = $api_instance->get_user_by_id(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->get_user_by_id: $@\n";
}

Parameters

Name Type Description Notes
id int id of User

Return type

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]

invite_user_by_mail

InviteUserSuccess invite_user_by_mail(data => $data)

Invite user by mail

Invite user by mail

Example

use Data::Dumper;
use RadioManagerClient::UserApi;
my $api_instance = RadioManagerClient::UserApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $data = RadioManagerClient::Object::InviteUserData->new(); # InviteUserData | Data **(Required)**

eval { 
    my $result = $api_instance->invite_user_by_mail(data => $data);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->invite_user_by_mail: $@\n";
}

Parameters

Name Type Description Notes
data InviteUserData Data (Required)

Return type

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]

list_users

UserResults list_users(page => $page, role_id => $role_id, limit => $limit, order_by => $order_by, order_direction => $order_direction)

Get all users.

List all users.

Example

use Data::Dumper;
use RadioManagerClient::UserApi;
my $api_instance = RadioManagerClient::UserApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $page = 789; # int | Current page *(Optional)*
my $role_id = 789; # int | Search on Role ID *(Optional)*
my $limit = 789; # int | Results per page *(Optional)*
my $order_by = 'order_by_example'; # string | Field to order the results *(Optional)*
my $order_direction = 'order_direction_example'; # string | Direction of ordering *(Optional)*

eval { 
    my $result = $api_instance->list_users(page => $page, role_id => $role_id, limit => $limit, order_by => $order_by, order_direction => $order_direction);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->list_users: $@\n";
}

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

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]