Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 9.35 KB

ReasonV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 9.35 KB

halo_client.api.ReasonV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createReason POST /apis/notification.halo.run/v1alpha1/reasons
deleteReason DELETE /apis/notification.halo.run/v1alpha1/reasons/{name}
getReason GET /apis/notification.halo.run/v1alpha1/reasons/{name}
listReason GET /apis/notification.halo.run/v1alpha1/reasons
patchReason PATCH /apis/notification.halo.run/v1alpha1/reasons/{name}
updateReason PUT /apis/notification.halo.run/v1alpha1/reasons/{name}

createReason

Reason createReason(reason)

Create Reason

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().getReasonV1alpha1Api();
final Reason reason = ; // Reason | Fresh reason

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

Parameters

Name Type Description Notes
reason Reason Fresh reason [optional]

Return type

Reason

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]

deleteReason

deleteReason(name)

Delete Reason

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

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

Parameters

Name Type Description Notes
name String Name of reason

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]

getReason

Reason getReason(name)

Get Reason

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

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

Parameters

Name Type Description Notes
name String Name of reason

Return type

Reason

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]

listReason

ReasonList listReason(page, size, labelSelector, fieldSelector, sort)

List Reason

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

ReasonList

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]

patchReason

Reason patchReason(name, jsonPatchInner)

Patch Reason

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

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

Parameters

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

Return type

Reason

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]

updateReason

Reason updateReason(name, reason)

Update Reason

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().getReasonV1alpha1Api();
final String name = name_example; // String | Name of reason
final Reason reason = ; // Reason | Updated reason

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

Parameters

Name Type Description Notes
name String Name of reason
reason Reason Updated reason [optional]

Return type

Reason

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]