Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 9.99 KB

SubscriptionV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 9.99 KB

halo_client.api.SubscriptionV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createSubscription POST /apis/notification.halo.run/v1alpha1/subscriptions
deleteSubscription DELETE /apis/notification.halo.run/v1alpha1/subscriptions/{name}
getSubscription GET /apis/notification.halo.run/v1alpha1/subscriptions/{name}
listSubscription GET /apis/notification.halo.run/v1alpha1/subscriptions
patchSubscription PATCH /apis/notification.halo.run/v1alpha1/subscriptions/{name}
updateSubscription PUT /apis/notification.halo.run/v1alpha1/subscriptions/{name}

createSubscription

Subscription createSubscription(subscription)

Create Subscription

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().getSubscriptionV1alpha1Api();
final Subscription subscription = ; // Subscription | Fresh subscription

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

Parameters

Name Type Description Notes
subscription Subscription Fresh subscription [optional]

Return type

Subscription

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]

deleteSubscription

deleteSubscription(name)

Delete Subscription

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

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

Parameters

Name Type Description Notes
name String Name of subscription

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]

getSubscription

Subscription getSubscription(name)

Get Subscription

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

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

Parameters

Name Type Description Notes
name String Name of subscription

Return type

Subscription

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]

listSubscription

SubscriptionList listSubscription(page, size, labelSelector, fieldSelector, sort)

List Subscription

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

SubscriptionList

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]

patchSubscription

Subscription patchSubscription(name, jsonPatchInner)

Patch Subscription

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

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

Parameters

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

Return type

Subscription

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]

updateSubscription

Subscription updateSubscription(name, subscription)

Update Subscription

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().getSubscriptionV1alpha1Api();
final String name = name_example; // String | Name of subscription
final Subscription subscription = ; // Subscription | Updated subscription

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

Parameters

Name Type Description Notes
name String Name of subscription
subscription Subscription Updated subscription [optional]

Return type

Subscription

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]