subscribeToSearchGamesWithSport
This API powers the search functionality of a sports application. It creates a real-time subscription that filters the entire database based on a text string, returning matches where team names or competition names match the user's input.
Data structure sport -> region (if includeRegion is true) -> competition -> game
Documentation
Try it now
Request parameters:
Call example:
subscribeToSearchGamesWithSport({
searchValue: 'fulham',
includeRegion: true
})Response examples:
{
sport: {
'1': {
id: 1,
name: 'Football',
alias: 'Soccer',
order: 1,
region: {
'2570001': {
id: 2570001,
name: 'England',
alias: 'England',
order: 1,
competition: {
'538': {
id: 538,
name: 'Premier League',
order: 1,
game: {
'29671352': {
id: 29671352,
start_ts: 1779026400,
team2_name: 'Fulham',
team1_name: 'Wolverhampton Wanderers'
}
}
}
}
}
}
}
}
}