Skip to content

Commit

Permalink
fix(specs): remove private beta endpoint from recommend [skip-bc] (#4110
Browse files Browse the repository at this point in the history
) (generated) [skip ci]

Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Nov 15, 2024
1 parent 996ba50 commit 48fc1da
Show file tree
Hide file tree
Showing 59 changed files with 17 additions and 2,684 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ public RecommendationsRequest(LookingSimilarQuery actualInstance)
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}

/// <summary>
/// Initializes a new instance of the RecommendationsRequest class
/// with a RecommendedForYouQuery
/// </summary>
/// <param name="actualInstance">An instance of RecommendedForYouQuery.</param>
public RecommendationsRequest(RecommendedForYouQuery actualInstance)
{
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}


/// <summary>
/// Gets or Sets ActualInstance
Expand Down Expand Up @@ -136,16 +126,6 @@ public LookingSimilarQuery AsLookingSimilarQuery()
return (LookingSimilarQuery)ActualInstance;
}

/// <summary>
/// Get the actual instance of `RecommendedForYouQuery`. If the actual instance is not `RecommendedForYouQuery`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of RecommendedForYouQuery</returns>
public RecommendedForYouQuery AsRecommendedForYouQuery()
{
return (RecommendedForYouQuery)ActualInstance;
}


/// <summary>
/// Check if the actual instance is of `BoughtTogetherQuery` type.
Expand Down Expand Up @@ -192,15 +172,6 @@ public bool IsLookingSimilarQuery()
return ActualInstance.GetType() == typeof(LookingSimilarQuery);
}

/// <summary>
/// Check if the actual instance is of `RecommendedForYouQuery` type.
/// </summary>
/// <returns>Whether or not the instance is the type</returns>
public bool IsRecommendedForYouQuery()
{
return ActualInstance.GetType() == typeof(RecommendedForYouQuery);
}

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand Down Expand Up @@ -345,18 +316,6 @@ public override RecommendationsRequest Read(ref Utf8JsonReader reader, Type type
System.Diagnostics.Debug.WriteLine($"Failed to deserialize into LookingSimilarQuery: {exception}");
}
}
if (root.ValueKind == JsonValueKind.Object)
{
try
{
return new RecommendationsRequest(jsonDocument.Deserialize<RecommendedForYouQuery>(JsonConfig.Options));
}
catch (Exception exception)
{
// deserialization failed, try the next one
System.Diagnostics.Debug.WriteLine($"Failed to deserialize into RecommendedForYouQuery: {exception}");
}
}
throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined.");
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ export 'src/model/recommend_index_settings.dart';
export 'src/model/recommend_search_params.dart';
export 'src/model/recommendations_hits.dart';
export 'src/model/recommendations_results.dart';
export 'src/model/recommended_for_you.dart';
export 'src/model/recommended_for_you_model.dart';
export 'src/model/recommended_for_you_query.dart';
export 'src/model/redirect.dart';
export 'src/model/redirect_rule_index_data.dart';
export 'src/model/redirect_rule_index_metadata.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ import 'package:algoliasearch/src/model/recommend_index_settings.dart';
import 'package:algoliasearch/src/model/recommend_search_params.dart';
import 'package:algoliasearch/src/model/recommendations_hits.dart';
import 'package:algoliasearch/src/model/recommendations_results.dart';
import 'package:algoliasearch/src/model/recommended_for_you.dart';
import 'package:algoliasearch/src/model/recommended_for_you_model.dart';
import 'package:algoliasearch/src/model/recommended_for_you_query.dart';
import 'package:algoliasearch/src/model/redirect.dart';
import 'package:algoliasearch/src/model/redirect_rule_index_data.dart';
import 'package:algoliasearch/src/model/redirect_rule_index_metadata.dart';
Expand Down Expand Up @@ -279,14 +276,6 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
case 'RecommendationsResults':
return RecommendationsResults.fromJson(value as Map<String, dynamic>)
as ReturnType;
case 'RecommendedForYou':
return RecommendedForYou.fromJson(value as Map<String, dynamic>)
as ReturnType;
case 'RecommendedForYouModel':
return RecommendedForYouModel.fromJson(value) as ReturnType;
case 'RecommendedForYouQuery':
return RecommendedForYouQuery.fromJson(value as Map<String, dynamic>)
as ReturnType;
case 'Redirect':
return Redirect.fromJson(value as Map<String, dynamic>) as ReturnType;
case 'RedirectRuleIndexData':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ final class GetRecommendationsParams {
/// - [LookingSimilarQuery]
/// - [RelatedQuery]
/// - [TrendingItemsQuery]
/// - [RecommendedForYouQuery]
/// - [TrendingFacetsQuery]
/// - [BoughtTogetherQuery]
@JsonKey(name: r'requests')
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 48fc1da

Please sign in to comment.