Skip to content

davelively14/BITPress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

BITPress

This is a Template Tag plugin for WordPress that will connect with BandsInTown (BIT) API.

Current Version: 0.4

get_ticket_url

Insert the following on your page to generate a link to purchase tickets using your app_id where you want the href to appear:

<?php
  get_ticket_url($band, $date, $txt, $alt_url);
?>
  • $band: string. Name of the band in quotes (single or double). Examples: 'Creed' or 'Foo Fighters'
  • $date: string. Date of the event in YYYY-MM-DD format in quotes. Example: '2015-08-20'
  • $txt: string (optional). This is the text to be displayed within the hyperlinked portion of the href. Example: 'tickets' or 'buy tickets'.
  • $alt_url: string (optional). In the event that tickets are unavailable, this URL will be used for the href. Example: 'http://www.seatgeek.com/george+ezra/buy_tickets?AAz284TR'

Examples:

Input:

<?php
  get_ticket_url("Bronze Radio Return",
                 "2015-10-29",
                 "buy tickets",
                 "http://www.google.com");
?>

or with Insert PHP plugin:

[insert_php]
  get_ticket_url("Bronze Radio Return",
                 "2015-10-29",
                 "buy tickets",
                 "http://www.google.com");
[/insert_php]

Output:

Input:

<?php
  get_ticket_url("Bronze Radio Return",
                 "2015-10-29");
?>

or with Insert PHP plugin:

[insert_php]
  get_ticket_url("Bronze Radio Return",
                 "2015-10-29");
[/insert_php]

Output:

  • If tickets are available:
  • If tickets are unavailable:
  • Sold out! Online resale unavailable

NOTE: you can change the text in the output by adjusting the default Content constants.

get_tickets_list

Similar to get_ticket_url, but returns the ticket link, date and venue information in table form for a given event:

<?php get_ticket_list($band, $date, $alt_url);?>

or with Insert PHP plugin:

[insert_php]
  php get_ticket_list($band, $date, $alt_url);
[/insert_php]
  • $band: string. Name of the band in quotes (single or double). Examples: 'Creed' or 'Foo Fighters'
  • $date: string. Date of the event in YYYY-MM-DD format in quotes. Example: '2015-08-20'
  • $alt_url: string (optional). In the event that tickets are unavailable, this URL will be used for the href. Example: 'http://www.seatgeek.com/george+ezra/buy_tickets?AAz284TR'

Examples:

Input:

<?php
  get_ticket_url("Bronze Radio Return",
                 "2015-10-29",
                 "http://www.google.com");
?>

or with Insert PHP plugin:

[insert_php]
  get_ticket_url("Bronze Radio Return",         
                 "2015-10-29",
                 "http://www.google.com");
[/insert_php]

Output: Bronze Radio Return

Venue Date Tickets Vinyl 10/29/2015 at 8:30PM Buy on BandsInTown

events_by_artist

Returns a list of upcoming events for one or more artists for a given area.

<?php
  events_by_artist($artists, $txt, $radius, $city, $state);
?>

or with Insert PHP plugin:

[insert_php]
  events_by_artist($artists, $txt, $city, $state, $radius);
[/insert_php]
  • $artists: string or array of strings. Enter one or more artists names, separated by a comma. Examples: 'Poison,Of Monsters and Men, imagine dragons'
  • $txt: string (optional). This is the text to be displayed within the hyperlinked portion of the href. Example: 'tickets' or 'buy tickets'
  • $radius: integer (optional). Radius in miles from location for search. Max 150. Example: 75
  • $city: string (optional). City to center the search. Default is Atlanta. Example: 'Grand Rapids' or 'Charlotte'
  • $state: string (optional). Two letter state code. Default is 'GA'. Example: 'IA' or 'NC'

Examples:

Input:

<?php
  events_by_artist(
    'Of Monsters and Men, Bronze Radio Return, Drew Holcomb',
    'Buy Tickets',
    150
  );
?>

or with Insert PHP plugin:

[insert_php]
  events_by_artist(
    'Of Monsters and Men, Bronze Radio Return, Drew Holcomb',
    'Buy Tickets',
    150
  );
[/insert_php]
ArtistDateVenueTickets
Drew Holcomb & The Neighbors08/27/2015 at 7:00PMPeace Center (Greenville)Buy Tickets
Drew Holcomb & The Neighbors08/28/2015 at 7:00PMCottonseed Studios (Opelika)Buy Tickets
Of Monsters and Men10/07/2015 at 7:30PMRyman Auditorium (Nashville)Buy Tickets
Of Monsters and Men10/09/2015 at 8:00PMChastain Park Amphitheatre (Atlanta)Buy Tickets
Bronze Radio Return10/23/2015 at 7:00PMThe Camp House (Chattanooga)Buy Tickets
Bronze Radio Return10/24/2015 at 6:00PMDeep Roots Festival (Milledgeville)Buy Tickets
Bronze Radio Return10/29/2015 at 8:30PMVinyl (Atlanta)Buy Tickets
Bronze Radio Return11/01/2015 at 7:00PMThe Grey Eagle (Asheville)Buy Tickets
Drew Holcomb & The Neighbors11/12/2015 at 7:00PMTrack 29 (Chattanooga)Buy Tickets
Drew Holcomb & The Neighbors11/14/2015 at 7:00PMBuckhead Theatre (Atlanta)Buy Tickets
Drew Holcomb & The Neighbors12/23/2015 at 7:30PMSchermerhorn Symphony Center (Nashville)Buy Tickets

events_rec

Returns a table of recommended upcoming events for a specific location. The recommendation is based on a comma delimited list of artists.

<?php
  events_rec($artists, $txt, $radius, $city, $state);
?>

or with Insert PHP plugin:

[insert_php]
  events_rec($artists, $txt, $city, $state, $radius);
[/insert_php]
  • $artists: string. Enter one or more artists names, separated by a comma. Examples: 'Poison,Of Monsters and Men, imagine dragons'
  • $txt: string (optional). This is the text to be displayed within the hyperlinked portion of the href. Default is 'Buy on BandsInTown'. Example: 'tickets' or 'buy tickets'
  • $radius: integer (optional). Radius in miles from location for search. Max 150. Default is 25. Example: 75
  • $city: string (optional). City to center the search. Default is Atlanta. Example: 'Grand Rapids' or 'Charlotte'
  • $state: string (optional). Two letter state code. Default is 'GA'. Example: 'IA' or 'NC'

Examples:

Input:

<?php
  events_rec(
    'Of Monsters and Men, Bronze Radio Return, Drew Holcomb'
  );
?>

or with Insert PHP plugin:

[insert_php]
  events_by_artist(
    'Of Monsters and Men, Bronze Radio Return, Drew Holcomb'
  );
[/insert_php]

Output:

ArtistDateVenueTickets
Mumford and Sons04/11/2016 at 7:30PMInfinite Energy Aren a (Duluth)Buy on BandsInTown
Mumford and So ns04/12/2016 at 7:30PMInfinite Energy Arena (Duluth)Buy on BandsInTown
Drew Holcomb & The Neighbors05/14/2016 at 7:00PMCentennial Olympic Park (Atlanta)Buy on BandsInTown
Royal Teeth05/22/2016 at 7 :00PMThe Masquerade (Atlanta)Buy on BandsInTown
Air Traffic Controller05/27/2016 at 7:00PMPrivate House Concert (Atlanta)Buy on BandsInTown
Air Traffic Controller05/29/2016 at 7:00PMSunset Sessions at Piedmont Park (Atlanta)Buy on BandsInTown

Version Changes

Version 0.4

  • events_by_venue has been deprecated. The underlying functionality is no longer supported by BIT.
  • Added events_rec. Allows user to pass a group of artists and returns a list of recommended events.

Version 0.3

- Added get_ticket_list function. Returns a single event in list format. - Added $txt parameter to get_ticket_url function. Allows user to specify the text contained within the hyperlink. - Added events_by_artist. Returns a list of events for a given area for one or more artists. - Temporarily disabled availability check for tickets. Does not represent what we thought it did.

Version 0.2

- All links to ticket purchases (to include alternate sites) no includes rel="nofollow" option. - Added optional $max parameter to limit number of returned events for a given venue. The default will return all events. Passing a value of 0 will return all events.

About

Wordpress plugin that connects to BandsInTown API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages