Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 9.42 KB

CounterV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 9.42 KB

halo_client.api.CounterV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createCounter POST /apis/metrics.halo.run/v1alpha1/counters
deleteCounter DELETE /apis/metrics.halo.run/v1alpha1/counters/{name}
getCounter GET /apis/metrics.halo.run/v1alpha1/counters/{name}
listCounter GET /apis/metrics.halo.run/v1alpha1/counters
patchCounter PATCH /apis/metrics.halo.run/v1alpha1/counters/{name}
updateCounter PUT /apis/metrics.halo.run/v1alpha1/counters/{name}

createCounter

Counter createCounter(counter)

Create Counter

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().getCounterV1alpha1Api();
final Counter counter = ; // Counter | Fresh counter

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

Parameters

Name Type Description Notes
counter Counter Fresh counter [optional]

Return type

Counter

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]

deleteCounter

deleteCounter(name)

Delete Counter

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

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

Parameters

Name Type Description Notes
name String Name of counter

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]

getCounter

Counter getCounter(name)

Get Counter

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

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

Parameters

Name Type Description Notes
name String Name of counter

Return type

Counter

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]

listCounter

CounterList listCounter(page, size, labelSelector, fieldSelector, sort)

List Counter

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

CounterList

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]

patchCounter

Counter patchCounter(name, jsonPatchInner)

Patch Counter

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

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

Parameters

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

Return type

Counter

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]

updateCounter

Counter updateCounter(name, counter)

Update Counter

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().getCounterV1alpha1Api();
final String name = name_example; // String | Name of counter
final Counter counter = ; // Counter | Updated counter

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

Parameters

Name Type Description Notes
name String Name of counter
counter Counter Updated counter [optional]

Return type

Counter

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]