Skip to content
Drew Winstel edited this page Oct 13, 2020 · 8 revisions

Venues

These are locations that serve beer/cider/mead/... via taps.

Creating a venue

Request:

POST /api/v1/venues/

Parameters:

Name Type Required Description
name string Yes A friendly name for the venue (e.g. Sneakers O'Toole's)
address string No The street address of the venue
city string No The city in which the venue is located
state string No The state or province in which the venue is located
postal_code string No The zip/postal code of the venue
website string No Where to find the venue on the web
facebook_page string No Where to find the venue on Facebook
twitter_handle string No Where to find the venue on Twitter
instagram_handle string No Where to find the venue on Instagram
tap_list_provider string No Who provides the venue's digital tap list (DigitalPour, TapHunter, Untappd, etc.)

NOTE: tap_list_provider is restricted to the following options:

  • "manual" (The venue uses a chalkboard or other such manual means)
  • "digitalpour" (DigitalPour)
  • "taphunter" (TapHunter)
  • "untappd" (Untappd)
  • "" (Unknown)
  • "nook_html" (The Nook in Huntsville has its own static HTML tap list that requires scraping)
  • "test" (only used for testing purposes)
  • "stemandstein" (The Stem and Stein in Madison has its own Static HTML tap list)
  • "taplist.io" (https://taplist.io)

Filtering

You can look up venues by the following fields:

  • name (Venue name)
  • taps__beer__name (Beer name)
  • taps__beer__style__name (what specific style, e.g. American IPA)

You can also attach specific lookups to narrow/widen your search:

  • For numeric fields:
    • (Nothing appended): exact match
    • __lte: less than or equal to
    • __gte: greater than or equal to
    • __lt: less than
    • __gt: greater than
    • __isnull: boolean (give a value of True or False)
    • __in: comma-separated list of values
  • For string fields:
    • (Nothing appended): exact match
    • __iexact: case-insensitive exact match
    • __icontains: case-insensitive contains
    • __istartswith: case-insensitive starts with
    • __iendswith: case-insensitive ends with
    • __startswith: case-sensitive starts with
    • __endswith: case-sensitive ends with
    • __contains: case-sensitive contains
    • __regex: matches case-sensitive regex
    • __iregex: matches case-insensitive regex
    • __isnull: boolean (give a value of True or False)
    • __in: comma-separated list of values

To do the filtering, simply GET /venues/?name__icontains=das+stahl&taps__beer__name__icontains=monkey

Information we need to talk to various APIs

Untappd

For Untappd, the process is relatively straightforward:

  1. Get one of the venue admins on Untappd to go to the customize menus section of the venue admin page.
  2. Have them go to the website tab, and copy the embed code.
  3. Have them email that to us. Untappd has some instructions here: https://help.business.untappd.com/support/solutions/articles/16000041467-website-embed-adding-menus-to-your-website
  4. If they have the menu embedded on their website, go to that list and open the Chrome dev tools. Inside each section or tab of the menu, there will be a div with class="section-heading" or class="section-name" (preferred). The value of the text within that div is how we choose which sections we want to keep. For example, Yellowhammer's cocktail menu isn't beer, so we don't show it. Those are the categories we'll need to save.
  5. The URL in the embed code will point to https://business.untappd.com/locations/<location>/themes/<theme>/js. Both <location> and <theme> are integers. Those values go into the database fields for Untappd location and Untappd theme, respectively.

DigitalPour

TapHunter

  1. Find the venue from TapHunter's website
  2. Open that page.
  3. Copy the ID (integer at the end of the URL)
  4. That goes into the TapHunter Location field in the DB.

Taplist.io

  1. Ask the venue owner to create an additional display.
  2. Have them send the display ID and access code for that display (the same info they would use to set up a fire TV)
  3. Those fields go directly in the database as such.

Beermenus.com

  1. Find the location on beermenus.com, e.g. https://www.beermenus.com/places/64594-bad-daddy-s-burger-bar-huntsville
  2. Copy the ID and slug (everything after the last slash) from the URL.
  3. That goes into the Beermenus slug field in the database.
  4. On the beer list, look at the headings you want to keep. Right-click on the titles of each list you want to keep and choose Inspect.
  5. Right above the highlighted <lh> element will be a <ul>. The id value is what we want to keep. For example, Bad Daddy's "ON TAP" heading has an id of on_tap. Those values go into the Beermenus categories field in the DB (comma-separated list)
Clone this wiki locally