Skip to content

Latest commit

 

History

History
170 lines (117 loc) · 5.89 KB

CommentV1alpha1ConsoleApi.md

File metadata and controls

170 lines (117 loc) · 5.89 KB

halo_client.api.CommentV1alpha1ConsoleApi

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createComment POST /apis/api.console.halo.run/v1alpha1/comments
createReply POST /apis/api.console.halo.run/v1alpha1/comments/{name}/reply
listComments GET /apis/api.console.halo.run/v1alpha1/comments

createComment

Comment createComment(commentRequest)

Create a comment.

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().getCommentV1alpha1ConsoleApi();
final CommentRequest commentRequest = ; // CommentRequest | 

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

Parameters

Name Type Description Notes
commentRequest CommentRequest

Return type

Comment

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createReply

Reply createReply(name, replyRequest)

Create a reply.

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().getCommentV1alpha1ConsoleApi();
final String name = name_example; // String | 
final ReplyRequest replyRequest = ; // ReplyRequest | 

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

Parameters

Name Type Description Notes
name String
replyRequest ReplyRequest

Return type

Reply

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listComments

ListedCommentList listComments(page, size, labelSelector, fieldSelector, sort, keyword, ownerKind, ownerName)

List comments.

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().getCommentV1alpha1ConsoleApi();
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.
final String keyword = keyword_example; // String | Comments filtered by keyword.
final String ownerKind = ownerKind_example; // String | Commenter kind.
final String ownerName = ownerName_example; // String | Commenter name.

try {
    final response = api.listComments(page, size, labelSelector, fieldSelector, sort, keyword, ownerKind, ownerName);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CommentV1alpha1ConsoleApi->listComments: $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.
keyword String Comments filtered by keyword. [optional]
ownerKind String Commenter kind. [optional]
ownerName String Commenter name. [optional]

Return type

ListedCommentList

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]