fix: map theme auth in shared links (#8359)

fix: map theme auth
This commit is contained in:
Jason Rasmussen
2024-03-29 10:43:30 -04:00
committed by GitHub
parent fcc3b81745
commit 25c9b779e4
6 changed files with 28 additions and 8 deletions

View File

@@ -119,7 +119,7 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getMapStyle**
> Object getMapStyle(theme)
> Object getMapStyle(theme, key)
@@ -143,9 +143,10 @@ import 'package:openapi/api.dart';
final api_instance = SystemConfigApi();
final theme = ; // MapTheme |
final key = key_example; // String |
try {
final result = api_instance.getMapStyle(theme);
final result = api_instance.getMapStyle(theme, key);
print(result);
} catch (e) {
print('Exception when calling SystemConfigApi->getMapStyle: $e\n');
@@ -157,6 +158,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**theme** | [**MapTheme**](.md)| |
**key** | **String**| | [optional]
### Return type

View File

@@ -102,7 +102,9 @@ class SystemConfigApi {
/// Parameters:
///
/// * [MapTheme] theme (required):
Future<Response> getMapStyleWithHttpInfo(MapTheme theme,) async {
///
/// * [String] key:
Future<Response> getMapStyleWithHttpInfo(MapTheme theme, { String? key, }) async {
// ignore: prefer_const_declarations
final path = r'/system-config/map/style.json';
@@ -113,6 +115,9 @@ class SystemConfigApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
queryParams.addAll(_queryParams('', 'theme', theme));
const contentTypes = <String>[];
@@ -132,8 +137,10 @@ class SystemConfigApi {
/// Parameters:
///
/// * [MapTheme] theme (required):
Future<Object?> getMapStyle(MapTheme theme,) async {
final response = await getMapStyleWithHttpInfo(theme,);
///
/// * [String] key:
Future<Object?> getMapStyle(MapTheme theme, { String? key, }) async {
final response = await getMapStyleWithHttpInfo(theme, key: key, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}

View File

@@ -27,7 +27,7 @@ void main() {
// TODO
});
//Future<Object> getMapStyle(MapTheme theme) async
//Future<Object> getMapStyle(MapTheme theme, { String key }) async
test('test getMapStyle', () async {
// TODO
});