Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 9.54 KB

CategoryV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 9.54 KB

halo_client.api.CategoryV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createCategory POST /apis/content.halo.run/v1alpha1/categories
deleteCategory DELETE /apis/content.halo.run/v1alpha1/categories/{name}
getCategory GET /apis/content.halo.run/v1alpha1/categories/{name}
listCategory GET /apis/content.halo.run/v1alpha1/categories
patchCategory PATCH /apis/content.halo.run/v1alpha1/categories/{name}
updateCategory PUT /apis/content.halo.run/v1alpha1/categories/{name}

createCategory

Category createCategory(category)

Create Category

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().getCategoryV1alpha1Api();
final Category category = ; // Category | Fresh category

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

Parameters

Name Type Description Notes
category Category Fresh category [optional]

Return type

Category

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]

deleteCategory

deleteCategory(name)

Delete Category

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

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

Parameters

Name Type Description Notes
name String Name of category

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]

getCategory

Category getCategory(name)

Get Category

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

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

Parameters

Name Type Description Notes
name String Name of category

Return type

Category

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]

listCategory

CategoryList listCategory(page, size, labelSelector, fieldSelector, sort)

List Category

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

CategoryList

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]

patchCategory

Category patchCategory(name, jsonPatchInner)

Patch Category

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

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

Parameters

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

Return type

Category

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]

updateCategory

Category updateCategory(name, category)

Update Category

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().getCategoryV1alpha1Api();
final String name = name_example; // String | Name of category
final Category category = ; // Category | Updated category

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

Parameters

Name Type Description Notes
name String Name of category
category Category Updated category [optional]

Return type

Category

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]