fix(server): memory lane title (#2772)

* fix(server): memory lane title

* feat: parallel requests

* pr feedback

* fix test

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen
2023-06-15 14:05:30 -04:00
committed by GitHub
parent 045bb855d2
commit 896645130b
14 changed files with 136 additions and 65 deletions

View File

@@ -1163,7 +1163,7 @@ Name | Type | Description | Notes
[[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)
# **getMemoryLane**
> List<MemoryLaneResponseDto> getMemoryLane(timezone)
> List<MemoryLaneResponseDto> getMemoryLane(timestamp)
@@ -1186,10 +1186,10 @@ import 'package:openapi/api.dart';
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final timezone = timezone_example; // String |
final timestamp = 2013-10-20T19:20:30+01:00; // DateTime | Get pictures for +24 hours from this time going back x years
try {
final result = api_instance.getMemoryLane(timezone);
final result = api_instance.getMemoryLane(timestamp);
print(result);
} catch (e) {
print('Exception when calling AssetApi->getMemoryLane: $e\n');
@@ -1200,7 +1200,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**timezone** | **String**| |
**timestamp** | **DateTime**| Get pictures for +24 hours from this time going back x years |
### Return type

View File

@@ -1118,8 +1118,9 @@ class AssetApi {
/// Performs an HTTP 'GET /asset/memory-lane' operation and returns the [Response].
/// Parameters:
///
/// * [String] timezone (required):
Future<Response> getMemoryLaneWithHttpInfo(String timezone,) async {
/// * [DateTime] timestamp (required):
/// Get pictures for +24 hours from this time going back x years
Future<Response> getMemoryLaneWithHttpInfo(DateTime timestamp,) async {
// ignore: prefer_const_declarations
final path = r'/asset/memory-lane';
@@ -1130,7 +1131,7 @@ class AssetApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'timezone', timezone));
queryParams.addAll(_queryParams('', 'timestamp', timestamp));
const contentTypes = <String>[];
@@ -1148,9 +1149,10 @@ class AssetApi {
/// Parameters:
///
/// * [String] timezone (required):
Future<List<MemoryLaneResponseDto>?> getMemoryLane(String timezone,) async {
final response = await getMemoryLaneWithHttpInfo(timezone,);
/// * [DateTime] timestamp (required):
/// Get pictures for +24 hours from this time going back x years
Future<List<MemoryLaneResponseDto>?> getMemoryLane(DateTime timestamp,) async {
final response = await getMemoryLaneWithHttpInfo(timestamp,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}

View File

@@ -129,7 +129,7 @@ void main() {
// TODO
});
//Future<List<MemoryLaneResponseDto>> getMemoryLane(String timezone) async
//Future<List<MemoryLaneResponseDto>> getMemoryLane(DateTime timestamp) async
test('test getMemoryLane', () async {
// TODO
});