Widget API

From Help.baskethotel.com

(Difference between revisions)
Jump to: navigation, search
Line 35: Line 35:
==All widgets==
==All widgets==
-
* [[Front page widget]] - used to provide general info about all leagues (schedule,standings,leaders)
+
 
-
* [[Full standings widget]] - shows team standings table with some interesting statistics
+
===Game widgets===
-
* [[Player card widget]] - shows information about player and full statistics from one league
+
-
* [[Players list widget]] - shows players playing in one league
+
-
* [[Birthday list widget]] - shows players that have birthday today
+
-
* [[Team card widget]] - shows team information and statistics from one league
+
-
* [[Team list widget]] - shows team list participating in one competition
+
-
* [[Short standings widget]] - show team standings in compact manner
+
* [[Short schedule and results widget]] - shows few lattest and next games in one league
* [[Short schedule and results widget]] - shows few lattest and next games in one league
* [[Full schedule and results widget]] - shows all games in league
* [[Full schedule and results widget]] - shows all games in league
* [[All league schedule and results widget]] - shows all games in all leagues
* [[All league schedule and results widget]] - shows all games in all leagues
-
* [[Leaders widget]] - shows best players in particular statistical categories
 
-
* [[Season selector widget]] - enables to select differend season for widgets
 
* [[Game card widget]] - shows full information about particular game
* [[Game card widget]] - shows full information about particular game
-
* [[League selector widget]] - shows list of all leagues
+
* [[Calendar widget]] - shows calendar with highlighted days when games are played
 +
 
 +
===Standings widgets===
 +
* [[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 widgets===
 +
* [[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
 +
 
 +
===Player widgets===
 +
* [[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
 +
 
 +
===Statistics widgets===
* [[Player statistics widget]] - shows statistics of all players in all categories
* [[Player statistics widget]] - shows statistics of all players in all categories
* [[Team statistics widget]] - shows statistics of all teams 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
 +
 +
===Various widgets===
 +
* [[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
* [[Player records widget]] -
* [[Player records widget]] -
* [[Team records widget]] -
* [[Team records widget]] -
-
* [[Player comparisson widget]] - enables to statisticaly compare two payers
 
-
* [[Team comparisson widget]] - enables to statisticaly compare two teams
 
* [[Search form widget]] -
* [[Search form widget]] -
-
* [[Enrollments list widget]] -  
+
* [[Enrollments list widget]] -
-
* [[Team scoring statistics widget]] -
+
-
* [[Short playoffs widget]] - shows playoff pairs and game results
+
-
* [[Club card widget]] - shows general information about club and its teams
+
-
* [[Last month efficiency leaders widget]] - shows efficiency leaders from the last month
+
-
* [[Selected leaders widget]] - shows playes selected in BasketHotel, could be used for players of the month
+
-
* [[Calendar widget]] - shows calendar with highlighted days when games are played
+

Revision as of 09:15, 10 February 2011

Contents

What are they?

BasketHotel widget is a piece of HTML hosted on MBT servers and embeddable into third party websites using BasketHotel Widgets Javascript API.

General information about API

Required knowledge to implement widget

Knowledge of HTML and Javascript is needed for developer to implement widgets on the website.

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

Widgets API is exposed as a set of Javascript classes and constants. Widgets API should work correctly using Internet Explorer 7.0, Firefox 3.0, Opera 9.52, Safari 3, Google Chrome 1.0. Widgets API does not include any third party libraries so it is safe to use with different Javascript libraries. To use Widgets API include code block below in head part of your webpage

<script type="text/javascript" src="http://widgets.baskethotel.com/static/scripts/api/api.js"></script>
<script type="text/javascript">
MBT.API.ApiId = "2042ea315309ac8e8be9dca1f86f449d3e207dd5 ";
</script>

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.

Internationalization

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.

Example:

MBT.API.Lang = "en".

Contact MBT to get information about multi language support.

All widgets

Game widgets

Standings widgets

Team widgets

Player widgets

Statistics widgets

Various widgets

Personal tools