Skip to content

Latest commit

 

History

History
151 lines (98 loc) · 4.15 KB

MetricsV1alpha1PublicApi.md

File metadata and controls

151 lines (98 loc) · 4.15 KB

halo_client.api.MetricsV1alpha1PublicApi

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
count POST /apis/api.halo.run/v1alpha1/trackers/counter
downvote POST /apis/api.halo.run/v1alpha1/trackers/downvote
upvote POST /apis/api.halo.run/v1alpha1/trackers/upvote

count

count(counterRequest)

Count an extension resource visits.

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().getMetricsV1alpha1PublicApi();
final CounterRequest counterRequest = ; // CounterRequest | 

try {
    api.count(counterRequest);
} catch on DioException (e) {
    print('Exception when calling MetricsV1alpha1PublicApi->count: $e\n');
}

Parameters

Name Type Description Notes
counterRequest CounterRequest

Return type

void (empty response body)

Authorization

basicAuth, bearerAuth

HTTP request headers

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

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

downvote

downvote(voteRequest)

Downvote an extension resource.

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().getMetricsV1alpha1PublicApi();
final VoteRequest voteRequest = ; // VoteRequest | 

try {
    api.downvote(voteRequest);
} catch on DioException (e) {
    print('Exception when calling MetricsV1alpha1PublicApi->downvote: $e\n');
}

Parameters

Name Type Description Notes
voteRequest VoteRequest

Return type

void (empty response body)

Authorization

basicAuth, bearerAuth

HTTP request headers

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

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

upvote

upvote(voteRequest)

Upvote an extension resource.

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().getMetricsV1alpha1PublicApi();
final VoteRequest voteRequest = ; // VoteRequest | 

try {
    api.upvote(voteRequest);
} catch on DioException (e) {
    print('Exception when calling MetricsV1alpha1PublicApi->upvote: $e\n');
}

Parameters

Name Type Description Notes
voteRequest VoteRequest

Return type

void (empty response body)

Authorization

basicAuth, bearerAuth

HTTP request headers

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

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