-
Notifications
You must be signed in to change notification settings - Fork 6
Venues
Drew Winstel edited this page Oct 25, 2020
·
8 revisions
These are locations that serve beer/cider/mead/... via taps.
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)
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 ofTrue
orFalse
) -
__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 ofTrue
orFalse
) -
__in
: comma-separated list of values
To do the filtering, simply GET
/venues/?name__icontains=das+stahl&taps__beer__name__icontains=monkey
For Untappd, the process is relatively straightforward:
- Have them follow the instructions here: https://help.untappd.com/hc/en-us/articles/360034332011-Website-Embed-Adding-Menus-to-your-Website
- Have them send you the
WordPress Shortcode
. It will be of the form[untappd-menu location=12345 theme=678901]
. - The
location
andtheme
values (e.g. 12345 and 678901 from the example above) go into the database fields forUntappd location
andUntappd theme
, respectively.
- Get the API key from one of the HSV.beer maintainers.
- Retrieve
https://mobile.digitalpour.com/DashboardServer/v4/MobileApp/StoreLocations?ApiKey=<api key>
- Parse the JSON (list of locations) and find the location you need.
- The
CompanyId
is theDigitalPour Venue ID
. - The
LocationId
is theDigitalPour Location ID
.
- Find the venue from TapHunter's website
- Open that page.
- Copy the ID (integer at the end of the URL)
- That goes into the
TapHunter Location
field in the DB.
- Ask the venue owner to create an additional display.
- 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.
- Open the chrome dev tools.
- Find an XHR request for
https://api.taplist.io/api/v1/displays/xxxx?r=commanded
, wherexxxx
is an integer. That value is the taplist.io display ID. - 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 theContent
. That goes in the database as taplist.io access code.
- Find the location on beermenus.com, e.g. https://www.beermenus.com/places/64594-bad-daddy-s-burger-bar-huntsville
- Copy the ID and slug (everything after the last slash) from the URL.
- That goes into the
Beermenus slug
field in the database. - 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
. - Right above the highlighted
<lh>
element will be a<ul>
. Theid
value is what we want to keep. For example, Bad Daddy's "ON TAP" heading has an id ofon_tap
. Those values go into theBeermenus categories
field in the DB (comma-separated list)