JS SDK v.1.132.0
about 2 hours ago by Viktor Yordanov
Added
- createSDK: bundle only the namespaces you use (ESM). Pass the namespaces you need as the second argument, e.g. createSDK(config, [football, profile]). Only those namespaces end up in your bundle.
- helpers, progress and getVersion are always available.
- Using a namespace you didn't pass throws an error. With TypeScript, this is also reported at compile time.
- FansUnitedSDK still works as before and includes every namespace.
- Multiple statuses in the games status filter. matchQuiz.getGames and topX.getGames accept:
- a single status
- an array, e.g. {status: [GameStatusEnum.PENDING, GameStatusEnum.SETTLED]}
- a comma-separated string
Values are trimmed, upper-cased and de-duplicated. Blank entries such as a trailing comma are ignored.
ChangedThe status filter is now validated instead of being silently dropped. Before, an array, a comma-separated string or an unknown status was ignored without warning, and games in all statuses were returned. getGames now throws 400 / invalid_filters, and no request is sent, when:
- a status isn't a GameStatusEnum value
- Match Quiz / Top X get more than one status together with flags. The API doesn't support this combination.
- standingGame.getGames, eventGame.getGames or bracketGame.getGames get more than one status.These APIs accept only one.
If you pass invalid status values today, you'll now get an error. Check your status filters before upgrading.
