What are they?
General information about API
Required knowledge to implement widget
Widget API code
To use Widgets API you must acquire Widgets API Code from MBT. Widgets API Code is a unique identifier provided for you to use full capabilities of BasketHotel widgets on your site. Widgets API Code example: 2042ea315309ac8e8be9dca1f86f449d3e207dd5
Programming using Widgets API
Dynamic loading of scripts (recommended way)
Dynamic loading if recommended way because it tracks changes on MBT side and loads refreshed content into webpage containing widgets despite of proxy and/or browser cache. To use Widgets API include code block below in head part of your webpage.
MBT will provide you with the api id dedicated for you.
Static loading of scripts
To use Widgets API include code block below in head part of your webpage
MBT will provide you with the api id dedicated for you.
Setting season and league for widget
Most of the widgets require to have league or season to be set. It is done by passing season_id or league_id paramaters to widgets. If only league_id parameter is passed, default season is taken. If only season_id is passed, league_id is calculated automaticaly, this is possible because in BasketHotel all seasons are children of leagues, meaning "season 2010-2011" in "Mens league" and "season 2010-2011" in "Womens league" will completely differend season and will have differend ids. If both "season_id" and "league_id" will be passed to widget, one has to make sure, that season is a child for league set, otherwhise widget will throw an error.
Widgets data is available in multiple language if we have data in multiple languages. To set language assign two symbols language code to MBT.API.Lang constant.
MBT.API.Lang = "en";
Contact MBT to get information about multi language support.
Using translations from another account
Sometimes it is necessary to use translations from another account of BasketHotel. Therefore widget config provides two options (both need to be set in this case):
Please not that not all phrases are translated to destination language.
These options can also be set for all widgets on page:
MBT.API.translationsLang = trLang; MBT.API.translationsSetId = trSet;
Player name formatting
Order of first and last names
Widgets display first name before last name by default. If last name should be displayed before first name, please use this option:
MBT.API.ShowSurnameFirst = true;
First name priority
When short form of player name is used, full last name is displayed, and only first characted of first name is displayed. If last name should be shortened and first name should be displayed in full form, please use this option:
MBT.API.FirstNamePriority = true;
API ids instead of BHotel ones
It is possible to use api ids instead of bhotel ones in widget parameters and links. Currently supported parameters for ids conversion:
- Short schedule and results widget - shows few lattest and next games in one league
- Full schedule and results widget - shows all games in league
- All league schedule and results widget - shows all games in all leagues
- Game card widget - shows full information about particular game
- Calendar widget - shows calendar with highlighted days when games are played
- Group results widget - shows table of group matches with results
- Game scroller widget - shows nearest games and lattest results in boxes which may be scrolled horizontaly
- Full standings widget - shows team standings table with some interesting statistics
- Short standings widget - show team standings in compact manner
- Short playoffs widget - shows playoff pairs and game results
- Team list widget - shows team list participating in one competition
- Team card widget - shows team information and statistics from one league
- Team comparisson widget - enables to statisticaly compare two teams
- Players list widget - shows players playing in one league
- Player card widget - shows information about player and full statistics from one league
- Birthday list widget - shows players that have birthday today
- Leaders widget - shows best players in particular statistical categories
- Player comparisson widget - enables to statisticaly compare two payers
- Selected leaders widget - shows playes selected in BasketHotel, could be used for players of the month
- Player statistics widget - shows statistics of all players in all categories
- Team statistics widget - shows statistics of all teams in all categories
- Scoring statistics widget - shows statistics based on game scores and quarter results
- Last month efficiency leaders widget - shows efficiency leaders from the last month
- Winning Percentage widget -
- Attendance Full widget -
- Attendance Top5 widget -
National teams widgets
- National teams front page - shows summarized information about national teams.
- National teams players statistics - shows statistical leaders of national teams.
- National team widget - shown information and statistics of one national team.
- National team tournament - shown information and statistics of tournament national team has participated.
- National teams games overview - shows overview of national teams games.
- National team game card - shows information and statistics for single game.
- National teams games and tournaments - shows list of national teams games and tournaments teams have participated.
- National teams players - shows list of national teams players.
- National team player - shows information and statistics of one national team player.
- Season selector widget - enables to select differend season for widgets
- Front page widget - used to provide general info about all leagues (schedule, standings, leaders)
- Club card widget - shows general information about club and its teams
- League selector widget - shows list of all leagues
- Custom league selector widget - shows selected leagues across multiple client accounts
- Player records widget -
- Team records widget -
- Search form widget -
- Enrollments list widget -
- Transfer list widget - shows transfers between clubs in one season
- Arena widget - shows arena information and a map for the arena
- Referees and host teams - games list with assigned referees and host teams
- Players top5 widget - show court with top5 players of game day or month