-
Notifications
You must be signed in to change notification settings - Fork 6
Venues
Drew Winstel edited this page Oct 13, 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:
- Get one of the venue admins on Untappd to go to the customize menus section of the venue admin page.
- Have them go to the website tab, and copy the embed code.
- 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
- 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
withclass="section-heading"
orclass="section-name"
(preferred). The value of the text within thatdiv
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. - 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 forUntappd location
andUntappd theme
, respectively.
- 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.
- Have them send the display ID and access code for that display (the same info they would use to set up a fire TV)
- Those fields go directly in the database as such.
- 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)