/bitshows

A simple, lightweight jQuery plugin to retrieve an artist's event listings on BandsInTown.

Primary LanguageJavaScriptMIT LicenseMIT

#Bitshows

A simple, lightweight jQuery plugin to retrieve an artist's event listings on BandsInTown.

See a demo

##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

  1. api_version: string (default: '2.0')
    A string that defines the BandsInTown API version to use.
  2. api_app_id: string (default: 'plugin')
    A random string that defines the application.
  3. artist: string (default: null)
    A string that defines the artist.
  4. range: string (date: "upcoming")
    A string that defines the range of dates for the events ("all", "upcoming", "dd/mm/yyyy").
  5. date_format: string (default: null)
    A string that overrides the default date format for the events ("dd/mm/yyyy", "mm/dd/yyyy").
  6. tickets: boolean (default: true)
    A boolean that indicates whether or not a link to buy tickets to the events should be displayed.
  7. loader: boolean (default: true)
    A boolean that indicates whether or not a loader should be displayed.
  8. success: function()
    A callback function that runs after the plugin, if the plugin is successful.
  9. 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.');
			}
		});
			
	});