#Bitshows
A simple, lightweight jQuery plugin to retrieve an artist's event listings on BandsInTown.
##Instructions
Include jQuery and the plugin in the head or footer of your page.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="/js/plugins/bitshows.js"></script>
Initialize the plugin using the class, ID or element you're targeting.
$('.bitshows').bitshows();
####Options
-
api_version: string (default: '2.0')
A string that defines the BandsInTown API version to use. -
api_app_id: string (default: 'plugin')
A random string that defines the application. -
artist: string (default: null)
A string that defines the artist. -
range: string (date: "upcoming")
A string that defines the range of dates for the events ("all", "upcoming", "dd/mm/yyyy"). -
date_format: string (default: null)
A string that overrides the default date format for the events ("dd/mm/yyyy", "mm/dd/yyyy"). -
tickets: boolean (default: true)
A boolean that indicates whether or not a link to buy tickets to the events should be displayed. -
loader: boolean (default: true)
A boolean that indicates whether or not a loader should be displayed. -
success: function()
A callback function that runs after the plugin, if the plugin is successful. -
error: function()
A callback function that runs after the plugin, if the plugin failed.
#####Example:
$(function() {
$('.bitshows').bitshows({
api_app_id "myapp",
artist: "Skrillex",
range: "all",
date_format: "dd/mm/yyyy",
tickets: false,
loader: false,
success: function() {
console.log('The plugin was successful!');
},
error: function() {
console.log('The plugin encountered an error.');
}
});
});