Skip to content

Latest commit

 

History

History
162 lines (109 loc) · 5.33 KB

PostV1alpha1PublicApi.md

File metadata and controls

162 lines (109 loc) · 5.33 KB

halo_client.api.PostV1alpha1PublicApi

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
queryPostByName GET /apis/api.content.halo.run/v1alpha1/posts/{name}
queryPostNavigationByName GET /apis/api.content.halo.run/v1alpha1/posts/{name}/navigation
queryPosts GET /apis/api.content.halo.run/v1alpha1/posts

queryPostByName

PostVo queryPostByName(name)

Gets a post by name.

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().getPostV1alpha1PublicApi();
final String name = name_example; // String | Post name

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

Parameters

Name Type Description Notes
name String Post name

Return type

PostVo

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]

queryPostNavigationByName

NavigationPostVo queryPostNavigationByName(name)

Gets a post navigation by name.

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().getPostV1alpha1PublicApi();
final String name = name_example; // String | Post name

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

Parameters

Name Type Description Notes
name String Post name

Return type

NavigationPostVo

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]

queryPosts

ListedPostVoList queryPosts(page, size, labelSelector, fieldSelector, sort)

Lists posts.

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

ListedPostVoList

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]