Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 9.99 KB

NotificationV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 9.99 KB

halo_client.api.NotificationV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createNotification POST /apis/notification.halo.run/v1alpha1/notifications
deleteNotification DELETE /apis/notification.halo.run/v1alpha1/notifications/{name}
getNotification GET /apis/notification.halo.run/v1alpha1/notifications/{name}
listNotification GET /apis/notification.halo.run/v1alpha1/notifications
patchNotification PATCH /apis/notification.halo.run/v1alpha1/notifications/{name}
updateNotification PUT /apis/notification.halo.run/v1alpha1/notifications/{name}

createNotification

Notification createNotification(notification)

Create Notification

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().getNotificationV1alpha1Api();
final Notification notification = ; // Notification | Fresh notification

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

Parameters

Name Type Description Notes
notification Notification Fresh notification [optional]

Return type

Notification

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]

deleteNotification

deleteNotification(name)

Delete Notification

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

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

Parameters

Name Type Description Notes
name String Name of notification

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]

getNotification

Notification getNotification(name)

Get Notification

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

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

Parameters

Name Type Description Notes
name String Name of notification

Return type

Notification

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]

listNotification

NotificationList listNotification(page, size, labelSelector, fieldSelector, sort)

List Notification

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

NotificationList

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]

patchNotification

Notification patchNotification(name, jsonPatchInner)

Patch Notification

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

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

Parameters

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

Return type

Notification

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]

updateNotification

Notification updateNotification(name, notification)

Update Notification

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().getNotificationV1alpha1Api();
final String name = name_example; // String | Name of notification
final Notification notification = ; // Notification | Updated notification

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

Parameters

Name Type Description Notes
name String Name of notification
notification Notification Updated notification [optional]

Return type

Notification

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]