13 October 2022
Release notes
JS SDK v1.6.0
Improvements:
-
A new Predictor validator is avaible. It will validate all provided predictions (SINGLE, TOP_X and MATCH_QUIZ). Available when developer calls sdk.predictor.makeFootballPrediction(), sdk.topX.play() and sdk.matchQuiz.play() . That way the prediction will be validated before sending it to Fans United Prediction API.
-
A new field called matchQuiz is available in PointsModel. The model is returned when you call sdk.loyalty.getConfig().
-
A new field called predictionId is available in GamesTopXListModel and GamesMatchQuizListModel. These models are returned when the developer calls sdk.topX.getMyGameEditions(), sdk.topX.getUserGameEditions(), sdk.matchQuiz.getMyGameEditions() and sdk.matchQuiz.getUserGameEditions().
-
When showFullInterests() is called, to fetch the models one common request is send to Football API for each entity (competitions, teams and players).
Example: Robert's profile has 6 interests (2 competitions, 2 teams and 2 players). So when I visit his profile (sdk.profile.getById("Robert's ID").showFullInterests()
) 3 requests will be send from JS SDK to API - 1 for the profile, 1 for the 2 teams and 1 for the 2 players. The competitions are cached, so they will be fetched from there.
Bug Fixes:
-
When calling addInterest() and removeInterest() successively, а wrong reference of own profile is passsed for the second method call.
-
Interest's source and type are always transformed to upper case when are validated.