Skip to content

Latest commit

 

History

History
723 lines (480 loc) · 21.5 KB

ThemeV1alpha1ConsoleApi.md

File metadata and controls

723 lines (480 loc) · 21.5 KB

halo_client.api.ThemeV1alpha1ConsoleApi

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
activateTheme PUT /apis/api.console.halo.run/v1alpha1/themes/{name}/activation
fetchActivatedTheme GET /apis/api.console.halo.run/v1alpha1/themes/-/activation
fetchThemeConfig GET /apis/api.console.halo.run/v1alpha1/themes/{name}/config
fetchThemeJsonConfig GET /apis/api.console.halo.run/v1alpha1/themes/{name}/json-config
fetchThemeSetting GET /apis/api.console.halo.run/v1alpha1/themes/{name}/setting
installTheme POST /apis/api.console.halo.run/v1alpha1/themes/install
installThemeFromUri POST /apis/api.console.halo.run/v1alpha1/themes/-/install-from-uri
invalidateCache PUT /apis/api.console.halo.run/v1alpha1/themes/{name}/invalidate-cache
listThemes GET /apis/api.console.halo.run/v1alpha1/themes
reload PUT /apis/api.console.halo.run/v1alpha1/themes/{name}/reload
resetThemeConfig PUT /apis/api.console.halo.run/v1alpha1/themes/{name}/reset-config
updateThemeConfig PUT /apis/api.console.halo.run/v1alpha1/themes/{name}/config
updateThemeJsonConfig PUT /apis/api.console.halo.run/v1alpha1/themes/{name}/json-config
upgradeTheme POST /apis/api.console.halo.run/v1alpha1/themes/{name}/upgrade
upgradeThemeFromUri POST /apis/api.console.halo.run/v1alpha1/themes/{name}/upgrade-from-uri

activateTheme

Theme activateTheme(name)

Activate a theme 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().getThemeV1alpha1ConsoleApi();
final String name = name_example; // String | 

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

Parameters

Name Type Description Notes
name String

Return type

Theme

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]

fetchActivatedTheme

Theme fetchActivatedTheme()

Fetch the activated theme.

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().getThemeV1alpha1ConsoleApi();

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

Parameters

This endpoint does not need any parameter.

Return type

Theme

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]

fetchThemeConfig

ConfigMap fetchThemeConfig(name)

Fetch configMap of theme by configured configMapName. It is deprecated.

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

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

Parameters

Name Type Description Notes
name String

Return type

ConfigMap

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]

fetchThemeJsonConfig

JsonObject fetchThemeJsonConfig(name)

Fetch converted json config of theme by configured configMapName.

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

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

Parameters

Name Type Description Notes
name String

Return type

JsonObject

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]

fetchThemeSetting

Setting fetchThemeSetting(name)

Fetch setting of theme.

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

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

Parameters

Name Type Description Notes
name String

Return type

Setting

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]

installTheme

Theme installTheme()

Install a theme by uploading a zip file.

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().getThemeV1alpha1ConsoleApi();

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

Parameters

This endpoint does not need any parameter.

Return type

Theme

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: /

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

installThemeFromUri

Theme installThemeFromUri(installFromUriRequest)

Install a theme from uri.

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().getThemeV1alpha1ConsoleApi();
final InstallFromUriRequest installFromUriRequest = ; // InstallFromUriRequest | 

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

Parameters

Name Type Description Notes
installFromUriRequest InstallFromUriRequest

Return type

Theme

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]

invalidateCache

invalidateCache(name)

Invalidate theme template cache.

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

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

Parameters

Name Type Description Notes
name String

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]

listThemes

ThemeList listThemes(page, size, labelSelector, fieldSelector, uninstalled)

List themes.

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().getThemeV1alpha1ConsoleApi();
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 bool uninstalled = true; // bool | Whether to list uninstalled themes.

try {
    final response = api.listThemes(page, size, labelSelector, fieldSelector, uninstalled);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ThemeV1alpha1ConsoleApi->listThemes: $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]
uninstalled bool Whether to list uninstalled themes. [optional]

Return type

ThemeList

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]

reload

Theme reload(name)

Reload theme setting.

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

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

Parameters

Name Type Description Notes
name String

Return type

Theme

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]

resetThemeConfig

ConfigMap resetThemeConfig(name)

Reset the configMap of theme setting.

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

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

Parameters

Name Type Description Notes
name String

Return type

ConfigMap

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]

updateThemeConfig

ConfigMap updateThemeConfig(name, configMap)

Update the configMap of theme setting. It is deprecated.

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().getThemeV1alpha1ConsoleApi();
final String name = name_example; // String | 
final ConfigMap configMap = ; // ConfigMap | 

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

Parameters

Name Type Description Notes
name String
configMap ConfigMap

Return type

ConfigMap

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]

updateThemeJsonConfig

updateThemeJsonConfig(name, body)

Update the configMap of theme setting.

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().getThemeV1alpha1ConsoleApi();
final String name = name_example; // String | 
final JsonObject body = Object; // JsonObject | 

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

Parameters

Name Type Description Notes
name String
body JsonObject

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]

upgradeTheme

upgradeTheme(name, file)

Upgrade theme

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().getThemeV1alpha1ConsoleApi();
final String name = name_example; // String | 
final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | 

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

Parameters

Name Type Description Notes
name String
file MultipartFile

Return type

void (empty response body)

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

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

upgradeThemeFromUri

Theme upgradeThemeFromUri(name, upgradeFromUriRequest)

Upgrade a theme from uri.

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().getThemeV1alpha1ConsoleApi();
final String name = name_example; // String | 
final UpgradeFromUriRequest upgradeFromUriRequest = ; // UpgradeFromUriRequest | 

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

Parameters

Name Type Description Notes
name String
upgradeFromUriRequest UpgradeFromUriRequest

Return type

Theme

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]