Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 9 KB

UserV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 9 KB

halo_client.api.UserV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

All URIs are relative to http://localhost:8091

Method HTTP request Description
createUser POST /api/v1alpha1/users
deleteUser DELETE /api/v1alpha1/users/{name}
getUser GET /api/v1alpha1/users/{name}
listUser GET /api/v1alpha1/users
patchUser PATCH /api/v1alpha1/users/{name}
updateUser PUT /api/v1alpha1/users/{name}

createUser

User createUser(user)

Create User

Example

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().getUserV1alpha1Api();
final User user = ; // User | Fresh user

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

Parameters

Name Type Description Notes
user User Fresh user [optional]

Return type

User

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

deleteUser

deleteUser(name)

Delete User

Example

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().getUserV1alpha1Api();
final String name = name_example; // String | Name of user

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

Parameters

Name Type Description Notes
name String Name of user

Return type

void (empty response body)

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

getUser

User getUser(name)

Get User

Example

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().getUserV1alpha1Api();
final String name = name_example; // String | Name of user

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

Parameters

Name Type Description Notes
name String Name of user

Return type

User

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

listUser

UserList listUser(page, size, labelSelector, fieldSelector, sort)

List User

Example

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().getUserV1alpha1Api();
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.

try {
    final response = api.listUser(page, size, labelSelector, fieldSelector, sort);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserV1alpha1Api->listUser: $e\n');
}

Parameters

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.

Return type

UserList

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

patchUser

User patchUser(name, jsonPatchInner)

Patch User

Example

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().getUserV1alpha1Api();
final String name = name_example; // String | Name of user
final BuiltSet<JsonPatchInner> jsonPatchInner = ; // BuiltSet<JsonPatchInner> | 

try {
    final response = api.patchUser(name, jsonPatchInner);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserV1alpha1Api->patchUser: $e\n');
}

Parameters

Name Type Description Notes
name String Name of user
jsonPatchInner BuiltSet<JsonPatchInner> [optional]

Return type

User

Authorization

basicAuth, bearerAuth

HTTP request headers

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

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

updateUser

User updateUser(name, user)

Update User

Example

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().getUserV1alpha1Api();
final String name = name_example; // String | Name of user
final User user = ; // User | Updated user

try {
    final response = api.updateUser(name, user);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UserV1alpha1Api->updateUser: $e\n');
}

Parameters

Name Type Description Notes
name String Name of user
user User Updated user [optional]

Return type

User

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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