(drinks)
The drinks endpoints.
- get_drink - Get a drink.
- list_drinks - Get a list of drinks.
Get a drink by name, if authenticated this will include stock levels and product codes otherwise it will only include public information.
import speakeasybar
from speakeasybar.models import shared
s = speakeasybar.Speakeasybar(
security=shared.Security(
api_key="<YOUR_API_KEY>",
),
)
res = s.drinks.get_drink(name='<value>')
if res.drink is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
name |
str | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
errors.APIError | 5XX | application/json |
errors.SDKError | 4xx-5xx | / |
Get a list of drinks, if authenticated this will include stock levels and product codes otherwise it will only include public information.
import speakeasybar
from speakeasybar.models import shared
s = speakeasybar.Speakeasybar(
security=shared.Security(
api_key="<YOUR_API_KEY>",
),
)
res = s.drinks.list_drinks(drink_type=shared.DrinkType.SPIRIT)
if res.classes is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
drink_type |
Optional[shared.DrinkType] | ➖ | The type of drink to filter by. If not provided all drinks will be returned. |
server_url |
Optional[str] | ➖ | An optional server URL to use. |
Error Object | Status Code | Content Type |
---|---|---|
errors.APIError | 5XX | application/json |
errors.SDKError | 4xx-5xx | / |