Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Latest commit

 

History

History
727 lines (500 loc) · 24.8 KB

UserApi.md

File metadata and controls

727 lines (500 loc) · 24.8 KB

openapi.api.UserApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
authenticateUser POST /Users/{userId}/Authenticate Authenticates a user.
authenticateUserByName POST /Users/AuthenticateByName Authenticates a user by name.
authenticateWithQuickConnect POST /Users/AuthenticateWithQuickConnect Authenticates a user with quick connect.
createUserByName POST /Users/New Creates a user.
deleteUser DELETE /Users/{userId} Deletes a user.
forgotPassword POST /Users/ForgotPassword Initiates the forgot password process for a local user.
forgotPasswordPin POST /Users/ForgotPassword/Pin Redeems a forgot password pin.
getCurrentUser GET /Users/Me Gets the user based on auth token.
getPublicUsers GET /Users/Public Gets a list of publicly visible users for display on a login screen.
getUserById GET /Users/{userId} Gets a user by Id.
getUsers GET /Users Gets a list of users.
updateUser POST /Users/{userId} Updates a user.
updateUserConfiguration POST /Users/{userId}/Configuration Updates a user configuration.
updateUserEasyPassword POST /Users/{userId}/EasyPassword Updates a user's easy password.
updateUserPassword POST /Users/{userId}/Password Updates a user's password.
updateUserPolicy POST /Users/{userId}/Policy Updates a user policy.

authenticateUser

AuthenticationResult authenticateUser(userId, pw, password)

Authenticates a user.

Example

import 'package:openapi/api.dart';

final api = Openapi().getUserApi();
final String userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | The user id.
final String pw = pw_example; // String | The password as plain text.
final String password = password_example; // String | The password sha1-hash.

try {
    final response = api.authenticateUser(userId, pw, password);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->authenticateUser: $e\n');
}

Parameters

Name Type Description Notes
userId String The user id.
pw String The password as plain text.
password String The password sha1-hash. [optional]

Return type

AuthenticationResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

authenticateUserByName

AuthenticationResult authenticateUserByName(authenticateUserByName)

Authenticates a user by name.

Example

import 'package:openapi/api.dart';

final api = Openapi().getUserApi();
final AuthenticateUserByName authenticateUserByName = ; // AuthenticateUserByName | The M:Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(Jellyfin.Api.Models.UserDtos.AuthenticateUserByName) request.

try {
    final response = api.authenticateUserByName(authenticateUserByName);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->authenticateUserByName: $e\n');
}

Parameters

Name Type Description Notes
authenticateUserByName AuthenticateUserByName The M:Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(Jellyfin.Api.Models.UserDtos.AuthenticateUserByName) request.

Return type

AuthenticationResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

authenticateWithQuickConnect

AuthenticationResult authenticateWithQuickConnect(quickConnectDto)

Authenticates a user with quick connect.

Example

import 'package:openapi/api.dart';

final api = Openapi().getUserApi();
final QuickConnectDto quickConnectDto = ; // QuickConnectDto | The Jellyfin.Api.Models.UserDtos.QuickConnectDto request.

try {
    final response = api.authenticateWithQuickConnect(quickConnectDto);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->authenticateWithQuickConnect: $e\n');
}

Parameters

Name Type Description Notes
quickConnectDto QuickConnectDto The Jellyfin.Api.Models.UserDtos.QuickConnectDto request.

Return type

AuthenticationResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

createUserByName

UserDto createUserByName(createUserByName)

Creates a user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final CreateUserByName createUserByName = ; // CreateUserByName | The create user by name request body.

try {
    final response = api.createUserByName(createUserByName);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->createUserByName: $e\n');
}

Parameters

Name Type Description Notes
createUserByName CreateUserByName The create user by name request body.

Return type

UserDto

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

deleteUser

deleteUser(userId)

Deletes a user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final String userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | The user id.

try {
    api.deleteUser(userId);
} catch on DioException (e) {
    print('Exception when calling UserApi->deleteUser: $e\n');
}

Parameters

Name Type Description Notes
userId String The user id.

Return type

void (empty response body)

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

forgotPassword

ForgotPasswordResult forgotPassword(forgotPasswordDto)

Initiates the forgot password process for a local user.

Example

import 'package:openapi/api.dart';

final api = Openapi().getUserApi();
final ForgotPasswordDto forgotPasswordDto = ; // ForgotPasswordDto | The forgot password request containing the entered username.

try {
    final response = api.forgotPassword(forgotPasswordDto);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->forgotPassword: $e\n');
}

Parameters

Name Type Description Notes
forgotPasswordDto ForgotPasswordDto The forgot password request containing the entered username.

Return type

ForgotPasswordResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

forgotPasswordPin

PinRedeemResult forgotPasswordPin(forgotPasswordPinDto)

Redeems a forgot password pin.

Example

import 'package:openapi/api.dart';

final api = Openapi().getUserApi();
final ForgotPasswordPinDto forgotPasswordPinDto = ; // ForgotPasswordPinDto | The forgot password pin request containing the entered pin.

try {
    final response = api.forgotPasswordPin(forgotPasswordPinDto);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->forgotPasswordPin: $e\n');
}

Parameters

Name Type Description Notes
forgotPasswordPinDto ForgotPasswordPinDto The forgot password pin request containing the entered pin.

Return type

PinRedeemResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

getCurrentUser

UserDto getCurrentUser()

Gets the user based on auth token.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();

try {
    final response = api.getCurrentUser();
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->getCurrentUser: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

UserDto

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

getPublicUsers

BuiltList getPublicUsers()

Gets a list of publicly visible users for display on a login screen.

Example

import 'package:openapi/api.dart';

final api = Openapi().getUserApi();

try {
    final response = api.getPublicUsers();
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->getPublicUsers: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<UserDto>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

getUserById

UserDto getUserById(userId)

Gets a user by Id.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final String userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | The user id.

try {
    final response = api.getUserById(userId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->getUserById: $e\n');
}

Parameters

Name Type Description Notes
userId String The user id.

Return type

UserDto

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

getUsers

BuiltList getUsers(isHidden, isDisabled)

Gets a list of users.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final bool isHidden = true; // bool | Optional filter by IsHidden=true or false.
final bool isDisabled = true; // bool | Optional filter by IsDisabled=true or false.

try {
    final response = api.getUsers(isHidden, isDisabled);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserApi->getUsers: $e\n');
}

Parameters

Name Type Description Notes
isHidden bool Optional filter by IsHidden=true or false. [optional]
isDisabled bool Optional filter by IsDisabled=true or false. [optional]

Return type

BuiltList<UserDto>

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

updateUser

updateUser(userId, userDto)

Updates a user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final String userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | The user id.
final UserDto userDto = ; // UserDto | The updated user model.

try {
    api.updateUser(userId, userDto);
} catch on DioException (e) {
    print('Exception when calling UserApi->updateUser: $e\n');
}

Parameters

Name Type Description Notes
userId String The user id.
userDto UserDto The updated user model.

Return type

void (empty response body)

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

updateUserConfiguration

updateUserConfiguration(userId, userConfiguration)

Updates a user configuration.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final String userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | The user id.
final UserConfiguration userConfiguration = ; // UserConfiguration | The new user configuration.

try {
    api.updateUserConfiguration(userId, userConfiguration);
} catch on DioException (e) {
    print('Exception when calling UserApi->updateUserConfiguration: $e\n');
}

Parameters

Name Type Description Notes
userId String The user id.
userConfiguration UserConfiguration The new user configuration.

Return type

void (empty response body)

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

updateUserEasyPassword

updateUserEasyPassword(userId, updateUserEasyPassword)

Updates a user's easy password.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final String userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | The user id.
final UpdateUserEasyPassword updateUserEasyPassword = ; // UpdateUserEasyPassword | The M:Jellyfin.Api.Controllers.UserController.UpdateUserEasyPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserEasyPassword) request.

try {
    api.updateUserEasyPassword(userId, updateUserEasyPassword);
} catch on DioException (e) {
    print('Exception when calling UserApi->updateUserEasyPassword: $e\n');
}

Parameters

Name Type Description Notes
userId String The user id.
updateUserEasyPassword UpdateUserEasyPassword The M:Jellyfin.Api.Controllers.UserController.UpdateUserEasyPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserEasyPassword) request.

Return type

void (empty response body)

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

updateUserPassword

updateUserPassword(userId, updateUserPassword)

Updates a user's password.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final String userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | The user id.
final UpdateUserPassword updateUserPassword = ; // UpdateUserPassword | The M:Jellyfin.Api.Controllers.UserController.UpdateUserPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserPassword) request.

try {
    api.updateUserPassword(userId, updateUserPassword);
} catch on DioException (e) {
    print('Exception when calling UserApi->updateUserPassword: $e\n');
}

Parameters

Name Type Description Notes
userId String The user id.
updateUserPassword UpdateUserPassword The M:Jellyfin.Api.Controllers.UserController.UpdateUserPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserPassword) request.

Return type

void (empty response body)

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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

updateUserPolicy

updateUserPolicy(userId, userPolicy)

Updates a user policy.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: CustomAuthentication
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('CustomAuthentication').apiKeyPrefix = 'Bearer';

final api = Openapi().getUserApi();
final String userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | The user id.
final UserPolicy userPolicy = ; // UserPolicy | The new user policy.

try {
    api.updateUserPolicy(userId, userPolicy);
} catch on DioException (e) {
    print('Exception when calling UserApi->updateUserPolicy: $e\n');
}

Parameters

Name Type Description Notes
userId String The user id.
userPolicy UserPolicy The new user policy.

Return type

void (empty response body)

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

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