import 'package:halo_client/api.dart';
All URIs are relative to http://localhost:8091
Method | HTTP request | Description |
---|---|---|
changeAnyonePassword | PUT /apis/api.console.halo.run/v1alpha1/users/{name}/password | |
changeOwnPassword | PUT /apis/api.console.halo.run/v1alpha1/users/-/password | |
createUser | POST /apis/api.console.halo.run/v1alpha1/users | |
deleteUserAvatar | DELETE /apis/api.console.halo.run/v1alpha1/users/{name}/avatar | |
getCurrentUserDetail | GET /apis/api.console.halo.run/v1alpha1/users/- | |
getPermissions | GET /apis/api.console.halo.run/v1alpha1/users/{name}/permissions | |
getUserDetail | GET /apis/api.console.halo.run/v1alpha1/users/{name} | |
grantPermission | POST /apis/api.console.halo.run/v1alpha1/users/{name}/permissions | |
listUsers | GET /apis/api.console.halo.run/v1alpha1/users | |
sendEmailVerificationCode | POST /apis/api.console.halo.run/v1alpha1/users/-/send-email-verification-code | |
updateCurrentUser | PUT /apis/api.console.halo.run/v1alpha1/users/- | |
uploadUserAvatar | POST /apis/api.console.halo.run/v1alpha1/users/{name}/avatar | |
verifyEmail | POST /apis/api.console.halo.run/v1alpha1/users/-/verify-email |
User changeAnyonePassword(name, changePasswordRequest)
Change anyone password of user for admin.
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final String name = name_example; // String | Name of user. If the name is equal to '-', it will change the password of current user.
final ChangePasswordRequest changePasswordRequest = ; // ChangePasswordRequest |
try {
final response = api.changeAnyonePassword(name, changePasswordRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->changeAnyonePassword: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | Name of user. If the name is equal to '-', it will change the password of current user. | |
changePasswordRequest | ChangePasswordRequest |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User changeOwnPassword(changeOwnPasswordRequest)
Change own password of user.
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final ChangeOwnPasswordRequest changeOwnPasswordRequest = ; // ChangeOwnPasswordRequest |
try {
final response = api.changeOwnPassword(changeOwnPasswordRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->changeOwnPassword: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
changeOwnPasswordRequest | ChangeOwnPasswordRequest |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User createUser(createUserRequest)
Creates a new user.
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final CreateUserRequest createUserRequest = ; // CreateUserRequest |
try {
final response = api.createUser(createUserRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->createUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
createUserRequest | CreateUserRequest |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User deleteUserAvatar(name)
delete user avatar
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final String name = name_example; // String | User name
try {
final response = api.deleteUserAvatar(name);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->deleteUserAvatar: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | User name |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DetailedUser getCurrentUserDetail()
Get current user detail
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
try {
final response = api.getCurrentUserDetail();
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->getCurrentUserDetail: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserPermission getPermissions(name)
Get permissions of user
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final String name = name_example; // String | User name
try {
final response = api.getPermissions(name);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->getPermissions: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | User name |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DetailedUser getUserDetail(name)
Get user detail by name
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final String name = name_example; // String | User name
try {
final response = api.getUserDetail(name);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->getUserDetail: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | User name |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User grantPermission(name, grantRequest)
Grant permissions to user
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final String name = name_example; // String | User name
final GrantRequest grantRequest = ; // GrantRequest |
try {
final response = api.grantPermission(name, grantRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->grantPermission: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | User name | |
grantRequest | GrantRequest |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserEndpointListedUserList listUsers(page, size, labelSelector, fieldSelector, sort, keyword, role)
List users
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final int page = 56; // int | Page number. Default is 0.
final int size = 56; // int | Size number. Default is 0.
final BuiltList<String> labelSelector = ; // BuiltList<String> | Label selector. e.g.: hidden!=true
final BuiltList<String> fieldSelector = ; // BuiltList<String> | Field selector. e.g.: metadata.name==halo
final BuiltList<String> sort = ; // BuiltList<String> | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
final String keyword = keyword_example; // String | Keyword to search
final String role = role_example; // String | Role name
try {
final response = api.listUsers(page, size, labelSelector, fieldSelector, sort, keyword, role);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->listUsers: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
page | int | Page number. Default is 0. | [optional] |
size | int | Size number. Default is 0. | [optional] |
labelSelector | BuiltList<String> | Label selector. e.g.: hidden!=true | [optional] |
fieldSelector | BuiltList<String> | Field selector. e.g.: metadata.name==halo | [optional] |
sort | BuiltList<String> | Sorting criteria in the format: property,(asc | desc). Default sort order is ascending. Multiple sort criteria are supported. |
keyword | String | Keyword to search | [optional] |
role | String | Role name | [optional] |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
sendEmailVerificationCode(emailVerifyRequest)
Send email verification code for user
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final EmailVerifyRequest emailVerifyRequest = ; // EmailVerifyRequest |
try {
api.sendEmailVerificationCode(emailVerifyRequest);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->sendEmailVerificationCode: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
emailVerifyRequest | EmailVerifyRequest |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User updateCurrentUser(user)
Update current user profile, but password.
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final User user = ; // User |
try {
final response = api.updateCurrentUser(user);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->updateCurrentUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
user | User |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User uploadUserAvatar(name, file)
upload user avatar
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final String name = name_example; // String | User name
final MultipartFile file = BINARY_DATA_HERE; // MultipartFile |
try {
final response = api.uploadUserAvatar(name, file);
print(response);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->uploadUserAvatar: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | User name | |
file | MultipartFile |
- Content-Type: multipart/form-data
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
verifyEmail(verifyCodeRequest)
Verify email for user by code.
import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
final api = HaloClient().getUserV1alpha1ConsoleApi();
final VerifyCodeRequest verifyCodeRequest = ; // VerifyCodeRequest |
try {
api.verifyEmail(verifyCodeRequest);
} catch on DioException (e) {
print('Exception when calling UserV1alpha1ConsoleApi->verifyEmail: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
verifyCodeRequest | VerifyCodeRequest |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]