BYOB is an API that provides data about breweries in Denver and the beers that they carry. Users can add data to the API through POST requests, delete data with DELETE requests, and edit data with PUT requests.
See the deployed app here
Making an API call to this endpoint returns all breweries.
Data returned for each brewery includes:
- brewery id
- brewery name
- brewery city
- whether or not the brewery serves food
- whether or not the brewery is dog friendly
- whether or not the brewery has outdoor seating
- brewery website
- creation timestamp
- update timestamp
[{
"id": 1,
"name": "Odell",
"city": "Fort Collins",
"food": "no",
"dog_friendly": "yes",
"outdoor_seating": "yes",
"website": "www.odell.com",
"created_at": "2018-12-06T18:40:50.931Z",
"updated_at": "2018-12-06T18:40:50.931Z"
},
{
"id": 2,
"name": "New Belgium",
"city": "Fort Collins",
"food": "yes",
"dog_friendly": "no",
"outdoor_seating": "no",
"website": "www.newbelgium.com",
"created_at": "2018-12-06T18:40:50.931Z",
"updated_at": "2018-12-06T18:40:50.931Z"
},
{
"id": 3,
"name": "Avery Brewing",
"city": "Denver",
"food": "yes",
"dog_friendly": "yes",
"outdoor_seating": "yes",
"website": "www.averybrewing.com",
"created_at": "2018-12-06T18:40:50.931Z",
"updated_at": "2018-12-06T18:40:50.931Z"
}]
Including the brewery city in the URL will return all breweries located in that city.
http://..../api/breweries/?city=Denver
[{
"id": 22,
"name": "10 Barrel Brewing Company",
"city": "Denver",
"food": "yes",
"dog_friendly": "no",
"outdoor_seating": "yes",
"website": "www.10barrel.com",
"created_at": "2019-01-29T17:08:02.602Z",
"updated_at": "2019-01-29T17:08:02.602Z"
},
{
"id": 32,
"name": "Black Project Spontaneous & Wild Ales",
"city": "Denver",
"food": "no",
"dog_friendly": "no",
"outdoor_seating": "no",
"website": "www.blackprojectbeer.com",
"created_at": "2019-01-29T17:08:02.612Z",
"updated_at": "2019-01-29T17:08:02.612Z"
}]
Making an API call to this endpoint returns a brewery with the specified id.
- brewery id
- brewery name
- brewery city
- whether or not the brewery serves food
- whether or not the brewery is dog friendly
- whether or not the brewery has outdoor seating
- brewery website
- creation timestamp
- update timestamp
An id that corresponds to a brewery present in the database must be provided in the URL to return the desired JSON.
URL with specified id:
http://..../api/breweries/29
{
"id": 29,
"name": "Odell Brewing Company",
"city": "Denver",
"food": "yes",
"dog_friendly": "yes",
"outdoor_seating": "yes",
"website": "www.odellbrewing.com",
"created_at": "2019-01-29T17:08:02.608Z",
"updated_at": "2019-01-29T17:08:02.608Z"
}
Making an API call to this endpoint returns all beers for the brewery with the specified id.
Data returned for each beer:
- beer id
- beer name
- beer style
- beer abv
- beer availability
- corresponding brewery id
- creation timestamp
- update timestamp
An id that corresponds to an beer present in the database must be provided in the URL to return the desired JSON.
URL with specified id:
http://..../api/breweries/1/beers
Corresponding brewery:
{
"id": 29,
"name": "Odell Brewing Company",
"city": "Denver",
"food": "yes",
"dog_friendly": "yes",
"outdoor_seating": "yes",
"website": "www.odellbrewing.com",
"created_at": "2019-01-29T17:08:02.608Z",
"updated_at": "2019-01-29T17:08:02.608Z"
}
[{
"id": 19,
"name": "Gramps",
"style": "Oatmeal Stout",
"abv": "6.4",
"availability": "Special Release",
"brewery_id": 29,
"created_at": "2019-01-29T17:08:02.625Z",
"updated_at": "2019-01-29T17:08:02.625Z"
},
{
"id": 20,
"name": "Odell IPA",
"style": "American IPA",
"abv": "7.0",
"availability": "Year-Round",
"brewery_id": 29,
"created_at": "2019-01-29T17:08:02.625Z",
"updated_at": "2019-01-29T17:08:02.625Z"
}]
Making an API call to this endpoint adds a brewery to the database.
A correctly formatted brewery object must be provided in the request body in order to post
to the database.
{ name: <STRING>, city: <STRING>, food: <STRING>, dog_friendly: <STRING>, outdoor_seating: <STRING>, website: <STRING> }
{
"name": "Vail Brewing Company",
"city": "Vail",
"food": "yes",
"dog_friendly": "yes",
"outdoor_seating": "no",
"website": "www.vailbrewingco.com/",
}
Making an API call to this endpoint updates brewery properties of the brewery with the specified id.
An id that corresponds to a brewery present in the database must be provided in the URL.
URL with specified id:
http://..../api/breweries/1
Making an API call to this endpoint deletes the brewery with the specified id.
An id that corresponds to a brewery present in the database must be provided in the URL.
URL with specified id:
http://..../api/breweries/1
Making an API call to this endpoint returns all beers.
Data returned for each beer:
- beer id
- beer name
- beer style
- beer abv
- beer availability
- corresponding brewery id
- creation timestamp
- update timestamp
[{
"id": 14,
"name": "Wanda Mae's Peach Pie",
"style": "American Brown Ale",
"abv": "5.0",
"availability": "Rotating",
"brewery_id": 26,
"created_at": "2019-01-29T17:08:02.623Z",
"updated_at": "2019-01-29T17:08:02.623Z"
},
{
"id": 19,
"name": "Gramps",
"style": "Oatmeal Stout",
"abv": "6.4",
"availability": "Special Release",
"brewery_id": 29,
"created_at": "2019-01-29T17:08:02.625Z",
"updated_at": "2019-01-29T17:08:02.625Z"
},
{
"id": 24,
"name": "Tripel",
"style": "Belgian Tripel",
"abv": "7.8",
"availability": "Year-Round",
"brewery_id": 30,
"created_at": "2019-01-29T17:08:02.628Z",
"updated_at": "2019-01-29T17:08:02.628Z"
}]
Making an API call to this endpoint returns a beer with the specified id
Data returned the beer includes:
- beer id
- beer name
- beer style
- beer abv
- beer availability
- corresponding brewery id
- creation timestamp
- update timestamp
An id that corresponds to a beer present in the database must be provided in the URL to return the desired JSON.
URL with specified id:
http://..../api/beers/14
{
"id": 14,
"name": "Wanda Mae's Peach Pie",
"style": "American Brown Ale",
"abv": "5.0",
"availability": "Rotating",
"brewery_id": 26,
"created_at": "2019-01-29T17:08:02.623Z",
"updated_at": "2019-01-29T17:08:02.623Z"
}
Making an API call to this endpoint adds a beer to the database
- A correctly formatted beer object must be provided in the request body in order to
post
to the database.
{ name: <STRING>, style: <STRING>, abv: <STRING>, availability: <STRING> }
{
"name": "Tripel",
"style": "Belgian Tripel",
"abv": "7.8",
"availability": "Year-Round"
}
Making an API call to this endpoint updates beer properties of the beer with the specified id.
An id that corresponds to a beer present in the database must be provided in the URL.
URL with specified id:
http://..../api/beers/1
Making an API call to this endpoint deletes the beer with the specified id.
An id that corresponds to a beer present in the database must be provided in the URL.
URL with specified id:
http://..../api/beers/1
Loryn Mason GITHUB: @lorynmason
Ashley Levi GITHUB: @ashleylevi