Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 10.7 KB

PersonalAccessTokenV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 10.7 KB

halo_client.api.PersonalAccessTokenV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createPersonalAccessToken POST /apis/security.halo.run/v1alpha1/personalaccesstokens
deletePersonalAccessToken DELETE /apis/security.halo.run/v1alpha1/personalaccesstokens/{name}
getPersonalAccessToken GET /apis/security.halo.run/v1alpha1/personalaccesstokens/{name}
listPersonalAccessToken GET /apis/security.halo.run/v1alpha1/personalaccesstokens
patchPersonalAccessToken PATCH /apis/security.halo.run/v1alpha1/personalaccesstokens/{name}
updatePersonalAccessToken PUT /apis/security.halo.run/v1alpha1/personalaccesstokens/{name}

createPersonalAccessToken

PersonalAccessToken createPersonalAccessToken(personalAccessToken)

Create PersonalAccessToken

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().getPersonalAccessTokenV1alpha1Api();
final PersonalAccessToken personalAccessToken = ; // PersonalAccessToken | Fresh personalaccesstoken

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

Parameters

Name Type Description Notes
personalAccessToken PersonalAccessToken Fresh personalaccesstoken [optional]

Return type

PersonalAccessToken

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]

deletePersonalAccessToken

deletePersonalAccessToken(name)

Delete PersonalAccessToken

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

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

Parameters

Name Type Description Notes
name String Name of personalaccesstoken

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]

getPersonalAccessToken

PersonalAccessToken getPersonalAccessToken(name)

Get PersonalAccessToken

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

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

Parameters

Name Type Description Notes
name String Name of personalaccesstoken

Return type

PersonalAccessToken

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]

listPersonalAccessToken

PersonalAccessTokenList listPersonalAccessToken(page, size, labelSelector, fieldSelector, sort)

List PersonalAccessToken

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().getPersonalAccessTokenV1alpha1Api();
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.listPersonalAccessToken(page, size, labelSelector, fieldSelector, sort);
    print(response);
} catch on DioException (e) {
    print('Exception when calling PersonalAccessTokenV1alpha1Api->listPersonalAccessToken: $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

PersonalAccessTokenList

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]

patchPersonalAccessToken

PersonalAccessToken patchPersonalAccessToken(name, jsonPatchInner)

Patch PersonalAccessToken

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

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

Parameters

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

Return type

PersonalAccessToken

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]

updatePersonalAccessToken

PersonalAccessToken updatePersonalAccessToken(name, personalAccessToken)

Update PersonalAccessToken

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().getPersonalAccessTokenV1alpha1Api();
final String name = name_example; // String | Name of personalaccesstoken
final PersonalAccessToken personalAccessToken = ; // PersonalAccessToken | Updated personalaccesstoken

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

Parameters

Name Type Description Notes
name String Name of personalaccesstoken
personalAccessToken PersonalAccessToken Updated personalaccesstoken [optional]

Return type

PersonalAccessToken

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]