bandsintown-events
Version:
A simple Bands In Town events api wrapper
28 lines (23 loc) • 635 B
HTML
<html>
<script src="./../dist/bit-events.min.js"></script>
<script>
var Events = new BandsInTownEvents();
//set options for BandsInTownEvents
//app_id and artists are required
Events.setParams({
"app_id":"myappname", //can be anything
"artists":[ //accepts string for single artist or an array of artist names
"Wilco",
"Yeah Yeah Yeahs"
]
});
//get your events with success and error callbacks
Events.getEvents(function( events ){
for(var i = 0; i < events.length; i++){
console.log( events[i].venue.city + ", " + events[i].venue.region );
}
},function( errors ){
console.log(errors);
});
</script>
</html>