Skip to content
Drew Winstel edited this page Oct 25, 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. Have them follow the instructions here: https://help.untappd.com/hc/en-us/articles/360034332011-Website-Embed-Adding-Menus-to-your-Website
  2. Have them send you the WordPress Shortcode. It will be of the form [untappd-menu location=12345 theme=678901].
  3. The location and theme values (e.g. 12345 and 678901 from the example above) go into the database fields for Untappd location and Untappd theme, respectively.

DigitalPour

  1. Get the API key from one of the HSV.beer maintainers.
  2. Retrieve https://mobile.digitalpour.com/DashboardServer/v4/MobileApp/StoreLocations?ApiKey=<api key>
  3. Parse the JSON (list of locations) and find the location you need.
  4. The CompanyId is the DigitalPour Venue ID.
  5. The LocationId is the DigitalPour Location ID.

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. Open Chrome to https://display.taplist.io/display. Send the six-digit code to the venue owner and have them enter it at https://taplist.io/activate. Wait for your page to refresh while they enter the page.
  3. Open the chrome dev tools.
  4. Find an XHR request for https://api.taplist.io/api/v1/displays/xxxx?r=commanded, where xxxx is an integer. That value is the taplist.io display ID.
  5. Click the padlock in the address bar, then click Cookies. Expand taplist.io, then cookies, then find taplist_access_code. Click on that and copy the Content. That goes in the database as taplist.io access code.

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)