Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 9.53 KB

SnapshotV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 9.53 KB

halo_client.api.SnapshotV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createSnapshot POST /apis/content.halo.run/v1alpha1/snapshots
deleteSnapshot DELETE /apis/content.halo.run/v1alpha1/snapshots/{name}
getSnapshot GET /apis/content.halo.run/v1alpha1/snapshots/{name}
listSnapshot GET /apis/content.halo.run/v1alpha1/snapshots
patchSnapshot PATCH /apis/content.halo.run/v1alpha1/snapshots/{name}
updateSnapshot PUT /apis/content.halo.run/v1alpha1/snapshots/{name}

createSnapshot

Snapshot createSnapshot(snapshot)

Create Snapshot

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().getSnapshotV1alpha1Api();
final Snapshot snapshot = ; // Snapshot | Fresh snapshot

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

Parameters

Name Type Description Notes
snapshot Snapshot Fresh snapshot [optional]

Return type

Snapshot

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]

deleteSnapshot

deleteSnapshot(name)

Delete Snapshot

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

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

Parameters

Name Type Description Notes
name String Name of snapshot

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]

getSnapshot

Snapshot getSnapshot(name)

Get Snapshot

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

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

Parameters

Name Type Description Notes
name String Name of snapshot

Return type

Snapshot

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]

listSnapshot

SnapshotList listSnapshot(page, size, labelSelector, fieldSelector, sort)

List Snapshot

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

SnapshotList

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]

patchSnapshot

Snapshot patchSnapshot(name, jsonPatchInner)

Patch Snapshot

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

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

Parameters

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

Return type

Snapshot

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]

updateSnapshot

Snapshot updateSnapshot(name, snapshot)

Update Snapshot

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().getSnapshotV1alpha1Api();
final String name = name_example; // String | Name of snapshot
final Snapshot snapshot = ; // Snapshot | Updated snapshot

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

Parameters

Name Type Description Notes
name String Name of snapshot
snapshot Snapshot Updated snapshot [optional]

Return type

Snapshot

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]